-- LocalScript (StarterPlayerScripts) local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local toggleKey = Enum.KeyCode.N local noclipEnabled = false local waitingForKeyInput = false local character = player.Character or player.CharacterAdded:Wait() -- 🖼 GUI local gui = Instance.new("ScreenGui") gui.Name = "NoclipGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 150) frame.Position = UDim2.new(0.5, -150, 0.5, -75) frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35) frame.BackgroundTransparency = 0.1 frame.BorderSizePixel = 0 frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.Active = true frame.Draggable = true frame.Parent = gui local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0, 140, 0, 40) toggleButton.Position = UDim2.new(0, 10, 0, 10) toggleButton.BackgroundColor3 = Color3.fromRGB(40, 150, 90) toggleButton.TextColor3 = Color3.new(1, 1, 1) toggleButton.Font = Enum.Font.SourceSansBold toggleButton.TextSize = 20 toggleButton.Text = "Toggle Noclip" toggleButton.Parent = frame local keybindButton = Instance.new("TextButton") keybindButton.Size = UDim2.new(0, 140, 0, 40) keybindButton.Position = UDim2.new(0, 10, 0, 60) keybindButton.BackgroundColor3 = Color3.fromRGB(40, 90, 180) keybindButton.TextColor3 = Color3.new(1, 1, 1) keybindButton.Font = Enum.Font.SourceSansBold keybindButton.TextSize = 20 keybindButton.Text = "Set Toggle Key" keybindButton.Parent = frame local keybindLabel = Instance.new("TextLabel") keybindLabel.Size = UDim2.new(0, 120, 0, 40) keybindLabel.Position = UDim2.new(0, 160, 0, 60) keybindLabel.BackgroundColor3 = Color3.fromRGB(20, 20, 20) keybindLabel.TextColor3 = Color3.new(1, 1, 1) keybindLabel.Font = Enum.Font.SourceSans keybindLabel.TextSize = 20 keybindLabel.Text = toggleKey.Name keybindLabel.BorderSizePixel = 0 keybindLabel.Parent = frame -- 🔁 Update character on respawn player.CharacterAdded:Connect(function(char) character = char end) -- ✅ Noclip function local function toggleNoclip() noclipEnabled = not noclipEnabled toggleButton.Text = noclipEnabled and "Noclip: ON" or "Noclip: OFF" print("[Noclip]", noclipEnabled and "ENABLED" or "DISABLED") local char = player.Character if char then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = not noclipEnabled end end end end -- 👣 Noclip loop RunService.Stepped:Connect(function() if noclipEnabled then local char = player.Character if char then for _, part in char:GetDescendants() do if part:IsA("BasePart") then part.CanCollide = false end end end end end) -- 🖱 GUI Buttons toggleButton.MouseButton1Click:Connect(toggleNoclip) keybindButton.MouseButton1Click:Connect(function() keybindLabel.Text = "Press a key..." waitingForKeyInput = true end) -- ⌨ Keyboard input UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if waitingForKeyInput and input.UserInputType == Enum.UserInputType.Keyboard then toggleKey = input.KeyCode keybindLabel.Text = toggleKey.Name waitingForKeyInput = false return end if input.KeyCode == toggleKey then toggleNoclip() end end)