Advertisement
TeoMessiKing

ds

Feb 26th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. uis = game:GetService("UserInputService")
  2. player = script.Parent.Parent
  3. character = player.Character
  4.  
  5.  
  6. uis.InputBegan:Connect(function(key)
  7. if key.KeyCode == Enum.KeyCode.W then
  8. if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  9. local bv = player.Character.HumanoidRootPart.BodyVelocity
  10. bv.Parent = player.Character.HumanoidRootPart
  11. player.Character.HumanoidRootPart.Anchored = false
  12. while wait() do
  13.  
  14. bv.P = Vector3.new(1000,1000,1000)
  15. bv.Velocity = game.Workspace.Camera.CFrame.LookVector*100
  16. end
  17. else
  18. local bv = Instance.new("BodyVelocity")
  19. bv.Parent = player.Character.HumanoidRootPart
  20. player.Character.HumanoidRootPart.Anchored = false
  21. while wait() do
  22.  
  23. bv.P = Vector3.new(1000,1000,1000)
  24. bv.Velocity = game.Workspace.Camera.CFrame.LookVector*100
  25. end
  26.  
  27.  
  28.  
  29. end
  30. end
  31. end)
  32.  
  33.  
  34. uis.InputEnded:Connect(function(key)
  35. if key.KeyCode == Enum.KeyCode.W then
  36. local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
  37. if bv:FindFirstChild("BodyVelocity") then
  38. player.Character.HumanoidRootPart.Anchored = true
  39. else
  40.  
  41. print("No")
  42.  
  43. end
  44. end
  45. end)
  46.  
  47.  
  48.  
  49. uis.InputBegan:Connect(function(key)
  50. if key.KeyCode == Enum.KeyCode.X then
  51. local bv = game.Players.LocalPlayer.Character.HumanoidRootPart.BodyVelocity
  52. if game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  53. game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
  54. bv:Destroy()
  55.  
  56. end
  57. else print("No")
  58. end
  59. end)
  60.  
  61.  
  62.  
  63. uis.InputBegan:Connect(function(key)
  64. if key.KeyCode == Enum.KeyCode.S then
  65. if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
  66. local bv = player.Character.HumanoidRootPart.BodyVelocity
  67. bv.Parent = player.Character.HumanoidRootPart
  68. player.Character.HumanoidRootPart.Anchored = false
  69. while wait() do
  70.  
  71. bv.P = Vector3.new(1000,1000,1000)
  72. bv.Velocity = player.Character.HumanoidRootPart.CFrame.LookVector*100
  73. end
  74. end
  75. else print("Hi")
  76. end
  77. end)
  78.  
  79.  
  80. uis.InputEnded:Connect(function(key)
  81. if key.KeyCode == Enum.KeyCode.S then
  82. local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
  83. if bv:FindFirstChild("BodyVelocity") then
  84. player.Character.HumanoidRootPart.Anchored = true
  85. else
  86.  
  87. print("No")
  88.  
  89. end
  90. end
  91. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement