Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. local noclipplayer = game:GetService("Players").LocalPlayer
  2. local noclipmouse = noclipplayer:GetMouse()
  3. local bWords = ""
  4. local wWords = ""
  5. local donoclip = false
  6. local noclip = false
  7.  
  8. noclipmouse.KeyDown:connect(function(key)
  9. if (key == "b") then
  10. game:GetService("Players").LocalPlayer.Character.Head.Touched:connect(function(obj)
  11. if obj ~= workspace.Terrain then
  12. if donoclip == true then
  13.  
  14.  
  15. 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
  16.  
  17.  
  18. else
  19. if obj.CanCollide == true then
  20. wWords = wWords..obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)
  21. obj.CanCollide = false
  22.  
  23. else
  24. bWords = bWords..obj.Name.."xxx"..tostring(obj.Position.X)..tostring(obj.Position.Y)
  25. end
  26. end
  27. else
  28.  
  29. 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
  30. obj.CanCollide = true
  31.  
  32. end
  33. end
  34. end
  35. end)
  36. if noclip == false then
  37. donoclip = true
  38. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  39. Text = "NoClip: ON",
  40. Color = Color3.new(0, 1, 0)
  41. })
  42. noclip = true
  43. wWords = ""
  44. bWords = ""
  45. elseif noclip == true then
  46. donoclip = false
  47. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  48. Text = "NoClip: OFF",
  49. Color = Color3.new(1, 0, 0)
  50. })
  51. noclip = false
  52. end
  53. end
  54. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement