local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Remote = RS:FindFirstChild("DevAction") or Instance.new("RemoteEvent", RS) Remote.Name = "DevAction" local function SetupUI(player) local sg = Instance.new("ScreenGui", player:WaitForChild("PlayerGui")) sg.Name = "DevMenu" sg.ResetOnSpawn = false local frame = Instance.new("Frame", sg) frame.Size = UDim2.new(0, 150, 0, 100) frame.Position = UDim2.new(0, 10, 0.5, -50) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.Active = true frame.Draggable = true frame.Visible = false local function CreateBtn(name, pos, text) local b = Instance.new("TextButton", frame) b.Name = name b.Size = UDim2.new(1, -10, 0.4, 0) b.Position = pos b.Text = text b.BackgroundColor3 = Color3.fromRGB(50, 50, 50) b.TextColor3 = Color3.new(1, 1, 1) return b end local flyBtn = CreateBtn("Fly", UDim2.new(0, 5, 0.1, 0), "Fly: OFF") local noclipBtn = CreateBtn("Noclip", UDim2.new(0, 5, 0.5, 5), "Noclip: OFF") local ls = Instance.new("LocalScript", sg) ls.Source = [[ local UIS = game:GetService("UserInputService") local frame = script.Parent:WaitForChild("Frame") local remote = game:GetService("ReplicatedStorage"):WaitForChild("DevAction") local states = {Fly = false, Noclip = false} UIS.InputBegan:Connect(function(io, p) if not p and io.KeyCode == Enum.KeyCode.F2 then frame.Visible = not frame.Visible end end) for _, b in pairs(frame:GetChildren()) do if b:IsA("TextButton") then b.MouseButton1Click:Connect(function() states[b.Name] = not states[b.Name] b.Text = b.Name .. ": " .. (states[b.Name] and "ON" or "OFF") remote:FireServer(b.Name, states[b.Name]) end) end end ]] end Remote.OnServerEvent:Connect(function(player, action, state) local char = player.Character if not char or not char:FindFirstChild("HumanoidRootPart") then return end local root = char.HumanoidRootPart if action == "Fly" then if state then local bv = Instance.new("BodyVelocity", root) bv.Name = "DevFly" bv.MaxForce = Vector3.new(1, 1, 1) * math.huge task.spawn(function() while root:FindFirstChild("DevFly") do bv.Velocity = char.Humanoid.MoveDirection * 50 + Vector3.new(0, 2, 0) task.wait() end end) elseif root:FindFirstChild("DevFly") then root.DevFly:Destroy() end elseif action == "Noclip" then local connection connection = RunService.Stepped:Connect(function() if not state or not char:Parent then connection:Disconnect() return end for _, v in pairs(char:GetDescendants()) do if v:IsA("BasePart") then v.CanCollide = false end end end) end end) for _, p in pairs(Players:GetPlayers()) do SetupUI(p) end Players.PlayerAdded:Connect(SetupUI)