fatnok1

Untitled

Jan 14th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. --Script by Kohltastrophe / Toggle made by Kujo ; )
  2. game.Players.LocalPlayer.DevCameraOcclusionMode = 'Invisicam' --INVISCAM!!!
  3. local mouse = game.Players.LocalPlayer:GetMouse()
  4. local torso = game.Players.LocalPlayer.Character.Torso
  5. local dir = {w = 0, s = 0, a = 0, d = 0}
  6. local spd = 2 mouse.KeyDown:connect(function(key)
  7. if key:lower() == "w" then dir.w = 1
  8. elseif key:lower() == "s" then dir.s = 1
  9. elseif key:lower() == "a" then dir.a = 1
  10. elseif key:lower() == "d" then dir.d = 1
  11. elseif key:lower() == "q" then spd = spd + 1
  12. elseif key:lower() == "e" then spd = spd - 1
  13. end end)
  14. mouse.KeyUp:connect(function(key)
  15. if key:lower() == "w" then
  16. dir.w = 0
  17. elseif key:lower() == "s" then dir.s = 0
  18. elseif key:lower() == "a" then dir.a = 0
  19. elseif key:lower() == "d" then dir.d = 0
  20. end end)
  21.  
  22.  
  23. enabled = false
  24. mouse.keyDown:connect(function(key)
  25. if (key) == "m" and enabled == false then
  26. enabled = true
  27. repeat wait(1/44)
  28. game.Players.LocalPlayer.Character.Torso.Anchored = true
  29. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  30. 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)
  31. until enabled == false
  32. elseif enabled == false then
  33. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  34. game.Players.LocalPlayer.Character.Torso.Anchored = false
  35. end
  36. if (key) == "m" and enabled == true then
  37. enabled = false
  38. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  39. game.Players.LocalPlayer.Character.Torso.Anchored = false
  40.  
  41.  
  42. end
  43.  
  44. end)
Add Comment
Please, Sign In to add comment