Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local noclipplayer = game:GetService("Players").LocalPlayer
- local noclipmouse = noclipplayer:GetMouse()
- local bWords = ""
- local wWords = ""
- local donoclip = false
- local noclip = false
- noclipmouse.KeyDown:connect(function(key)
- if (key == "b") then
- game:GetService("Players").LocalPlayer.Character.Head.Touched:connect(function(obj)
- if obj ~= workspace.Terrain then
- if donoclip == true then
- if string.match(wWords, obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)) == obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y) then
- else
- if obj.CanCollide == true then
- wWords = wWords..obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)
- obj.CanCollide = false
- else
- bWords = bWords..obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)
- end
- end
- else
- if string.match(wWords, obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)) == obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y) then
- obj.CanCollide = true
- end
- end
- end
- end)
- if noclip == false then
- donoclip = true
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "NoClip: ON",
- Color = Color3.new(0, 1, 0)
- })
- noclip = true
- wWords = ""
- bWords = ""
- elseif noclip == true then
- donoclip = false
- game.StarterGui:SetCore("ChatMakeSystemMessage", {
- Text = "NoClip: OFF",
- Color = Color3.new(1, 0, 0)
- })
- noclip = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement