my first Rayfield script

an anonymous user · July 31, 2025
local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

local Window = Rayfield:CreateWindow({
   Name = "Testing script",
   Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
   LoadingTitle = "My first script",
   LoadingSubtitle = "by Jdididjdidkfjfk",
   ShowText = "Rayfield", -- for mobile users to unhide rayfield, change if you'd like
   Theme = "Default", -- Check https://[Log in to view URL]

   ToggleUIKeybind = "K", -- The keybind to toggle the UI visibility (string like "K" or Enum.KeyCode)

   DisableRayfieldPrompts = false,
   DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface

   ConfigurationSaving = {
      Enabled = false,
      FolderName = nil, -- Create a custom folder for your hub/game
      FileName = "My first script"
   },

   Discord = {
      Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
      Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
      RememberJoins = true -- Set this to false to make them join the discord every time they load it up
   },

   KeySystem = false, -- Set this to true to use our key system
   KeySettings = {
      Title = "Key",
      Subtitle = "Key System",
      Note = "Just type pizza", -- Use this to tell the user how to get a key
      FileName = "IdkWHATtoHADH", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
      SaveKey = false, -- The user's key will be saved, but if you change the key, they will be unable to use your script
      GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
      Key = {"Pizza"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
   }
})

local MainTab = Window:CreateTab("Universal", nil) -- Title, Image
local MainSection = MainTab:CreateSection("Main")

local Button = MainTab:CreateButton({
   Name = "Infinite Jump",
   Callback = function()
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

player.CharacterAdded:Connect(function(char)
	character = char
	humanoid = character:WaitForChild("Humanoid")
end)

UserInputService.JumpRequest:Connect(function()
	if humanoid then
		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	end
end)

   end,
})

local Button = MainTab:CreateButton({
   Name = "Noclip",
   Callback = function()
   -- Noclip Script (Client-sided)
-- Place in StarterPlayerScripts

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local noclip = true -- set to false if you want to start with noclip OFF

local function setNoclip(state)
	noclip = state
end

RunService.RenderStepped:Connect(function()
	if noclip and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
		for _, part in pairs(player.Character:GetDescendants()) do
			if part:IsA("BasePart") and part.CanCollide == true then
				part.CanCollide = false
			end
		end
	end
end)

-- Optional: toggle keybind (N to toggle noclip)
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end
	if input.KeyCode == Enum.KeyCode.N then
		noclip = not noclip
	end
end)

   end,
})

local Button = MainTab:CreateButton({
   Name = "Trip",
   Callback = function()
   local Players = game:GetService("Players")
local player = Players.LocalPlayer

local function tripCharacter()
	local character = player.Character or player.CharacterAdded:Wait()
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	local hrp = character:FindFirstChild("HumanoidRootPart")

	if humanoid and hrp then
		humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)

		local push = Instance.new("BodyVelocity")
		push.Velocity = hrp.CFrame.LookVector * 20 + Vector3.new(0, 5, 0)
		push.MaxForce = Vector3.new(1e5, 1e5, 1e5)
		push.P = 1e5
		push.Parent = hrp

		game:GetService("Debris"):AddItem(push, 0.25)

		task.delay(1, function()
			if humanoid:GetState() == Enum.HumanoidStateType.FallingDown then
				humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
			end
		end)
	end
end

player.CharacterAdded:Connect(function()
	task.wait(0.5)
	tripCharacter()
end)

if player.Character then
	task.wait(0.5)
	tripCharacter()
end

   end,
})

local Slider = MainTab:CreateSlider({
   Name = "Walkspeed slider",
   Range = {0, 1000000},
   Increment = 1,
   Suffix = "Speed",
   CurrentValue = 20,
   Flag = "Slider1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
   Callback = function(Value)
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Value)
   end,
})

local NDSTab = Window:CreateTab("Natural Disaster", nil) -- Title, Image
local Section = NDSTab:CreateSection("Natural Disaster Survival")

local Button = NDSTab:CreateButton({
   Name = "Lobby",
   Callback = function()
   -- Teleport player to specific coordinates on spawn

local Players = game:GetService("Players")
local player = Players.LocalPlayer

local teleportPosition = Vector3.new(-266, 195, 316)

local function teleportCharacter()
	local character = player.Character or player.CharacterAdded:Wait()
	local hrp = character:WaitForChild("HumanoidRootPart")

	-- Move the HumanoidRootPart to the target position
	hrp.CFrame = CFrame.new(teleportPosition)
end

-- Teleport when character spawns
player.CharacterAdded:Connect(function()
	task.wait(0.2) -- small delay to ensure parts are loaded
	teleportCharacter()
end)

-- If character already exists
if player.Character then
	task.wait(0.2)
	teleportCharacter()
end

   end,
})

local Button = NDSTab:CreateButton({
   Name = "Map",
   Callback = function()
   -- Teleport player to specific coordinates on spawn

local Players = game:GetService("Players")
local player = Players.LocalPlayer

local teleportPosition = Vector3.new(-144, 48, 3)

local function teleportCharacter()
	local character = player.Character or player.CharacterAdded:Wait()
	local hrp = character:WaitForChild("HumanoidRootPart")

	-- Move the HumanoidRootPart to the target position
	hrp.CFrame = CFrame.new(teleportPosition)
end

-- Teleport when character spawns
player.CharacterAdded:Connect(function()
	task.wait(0.2) -- short delay to make sure character is fully loaded
	teleportCharacter()
end)

-- If character already exists
if player.Character then
	task.wait(0.2)
	teleportCharacter()
end

   end,
})

local Input = NDSTab:CreateInput({
   Name = "Jump Boost",
   CurrentValue = "",
   PlaceholderText = "1-inf",
   RemoveTextAfterFocusLost = true,
   Flag = "Input1",
   Callback = function(Text)
        game.Players.LocalPlayer.Character.Humanoid.JumpPower = (Text)
   end,
})
Output

Comments

Please sign up or log in to contribute to the discussion.