Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Toggle = Instance.new("TextButton")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local Noclip = false
- Toggle.Parent = ScreenGui
- Toggle.Size = UDim2.new(0, 200, 0, 50)
- Toggle.Position = UDim2.new(0.5, -100, 0.5, -25)
- Toggle.Text = "Noclip"
- Toggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- Toggle.TextScaled = true
- Toggle.Active = true
- Toggle.Draggable = true
- local function Credits() game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Noclip Gui",
- Text = "Made By the_king.78",
- Duration = 12
- })
- end
- local Name = game.Players.LocalPlayer.Name
- local function NoclipFunc()
- Noclip = not Noclip
- if Noclip then
- Toggle.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- game:GetService('RunService').Stepped:Connect(function()
- if Noclip then
- for _, b in pairs(game.Workspace:GetChildren()) do
- if b.Name == Name then
- for _, v in pairs(game.Workspace[Name]:GetChildren()) do
- if v:IsA("BasePart") then
- v.CanCollide = false
- end
- end
- end
- end
- end
- end)
- else
- Toggle.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- for _, b in pairs(game.Workspace:GetChildren()) do
- if b.Name == Name then
- for _, v in pairs(game.Workspace[Name]:GetChildren()) do
- if v:IsA("BasePart") then
- v.CanCollide = true
- end
- end
- end
- end
- end
- end
- Credits()
- Toggle.MouseButton1Click:Connect(NoclipFunc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement