Advertisement
1yawaROS1

Noclip Script

Mar 31st, 2020
2,602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local noclipplayer = game:GetService("Players").LocalPlayer
  2. local noclipmouse = noclipplayer:GetMouse()
  3.  
  4. local donoclip = false
  5. local noclip = false
  6.  
  7. function b_noclip(key)
  8. if (key == "n") then
  9. if noclip == false then
  10. donoclip = true
  11.  
  12. noclip = true
  13. elseif noclip == true then
  14. donoclip = false
  15.  
  16. noclip = false
  17. end
  18. end
  19. end
  20.  
  21. noclipmouse.KeyDown:connect(b_noclip)
  22.  
  23. game:GetService("Players").LocalPlayer.Character.Head.Touched:connect(function(obj)
  24. if obj ~= workspace.Terrain then
  25. if donoclip == true then
  26. obj.CanCollide = false
  27. else
  28. obj.CanCollide = true
  29. end
  30. end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement