Samuel1234

Roblox Fly and Noclip Script

May 31st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. game.Players.LocalPlayer.DevCameraOcclusionMode = 'Invisicam' --INVISCAM!!!
  2. local mouse = game.Players.LocalPlayer:GetMouse()
  3. local torso = game.Players.LocalPlayer.Character.UpperTorso
  4. local dir = {w = 0, s = 0, a = 0, d = 0}
  5. local spd = 2 mouse.KeyDown:connect(function(key)
  6. if key:lower() == "w" then dir.w = 1
  7. elseif key:lower() == "s" then dir.s = 1
  8. elseif key:lower() == "a" then dir.a = 1
  9. elseif key:lower() == "d" then dir.d = 1
  10. elseif key:lower() == "q" then spd = spd + 1
  11. elseif key:lower() == "e" then spd = spd - 1
  12. end end)
  13. mouse.KeyUp:connect(function(key)
  14. if key:lower() == "w" then
  15. dir.w = 0
  16. elseif key:lower() == "s" then dir.s = 0
  17. elseif key:lower() == "a" then dir.a = 0
  18. elseif key:lower() == "d" then dir.d = 0
  19. end end)
  20.  
  21.  
  22. enabled = false
  23. mouse.keyDown:connect(function(key)
  24. if (key) == "m" and enabled == false then
  25. enabled = true
  26. repeat wait(1/44)
  27. game.Players.LocalPlayer.Character.UpperTorso.Anchored = true
  28. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  29. torso.CFrame = CFrame.new(torso.Position, game.Workspace.CurrentCamera.CoordinateFrame.p) * CFrame.Angles(0,math.rad(180),0) * CFrame.new((dir.d-dir.a)*spd,0,(dir.s-dir.w)*spd)
  30. until enabled == false
  31. elseif enabled == false then
  32. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  33. game.Players.LocalPlayer.Character.UpperTorso.Anchored = false
  34. end
  35. if (key) == "m" and enabled == true then
  36. enabled = false
  37. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  38. game.Players.LocalPlayer.Character.UpperTorso.Anchored = false
  39.  
  40.  
  41. end
  42.  
  43. end)
Add Comment
Please, Sign In to add comment