local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local noclipEnabled = false -- Create the GUI local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local button = Instance.new("TextButton") button.Size = UDim2.new(0, 200, 0, 50) button.Position = UDim2.new(0.5, -100, 0.9, 0) button.Text = "Toggle Noclip: OFF" button.Parent = screenGui button.BackgroundColor3 = Color3.fromRGB(255, 0, 0) button.TextSize = 20 -- Function to toggle noclip local function toggleNoclip() noclipEnabled = not noclipEnabled if noclipEnabled then button.Text = "Toggle Noclip: ON" button.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Make the character's parts non-collidable for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = false end end else button.Text = "Toggle Noclip: OFF" button.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Reset collision for _, part in pairs(character:GetChildren()) do if part:IsA("BasePart") then part.CanCollide = true end end end end -- Connect button click to toggle function button.MouseButton1Click:Connect(toggleNoclip)