-- Script to toggle noclip mode while holding "e" key local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Noclip = nil local Clip = nil function noclip() Clip = false local function Nocl() if Clip == false and game.Players.LocalPlayer.Character ~= nil then for _, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do if v:IsA('BasePart') and v.CanCollide then v.CanCollide = false end end end end Noclip = RunService.Stepped:Connect(Nocl) end function clip() if Noclip then Noclip:Disconnect() end Clip = true end -- Connect the UserInputService to detect key press and release UserInputService.InputBegan:Connect(function(input, gameProcessed) if input.KeyCode == Enum.KeyCode.E and not gameProcessed then noclip() end end) UserInputService.InputEnded:Connect(function(input, gameProcessed) if input.KeyCode == Enum.KeyCode.E and not gameProcessed then clip() end end)