Guest User

assasd

a guest
May 26th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. script.Parent.MaxSpeed = 10000
  2. maxspeed =script.Parent.MaxSpeed
  3. script.Parent.BodyPosition.Position = script.Parent.Position--------------------DO NOT CHANGE ANYTHING!
  4.  
  5.  
  6. value1 = 0
  7.  
  8.  
  9.  
  10. game.Workspace.Events1.Forwards.OnServerEvent:connect(function()
  11. print("F")
  12. if value1 < maxspeed then
  13. value1 = value1+25
  14. end
  15. script.Parent.Parent.Driving.Value = true
  16.  
  17. script.Parent.Parent.Left.Value = false
  18. script.Parent.Parent.Right.Value = false
  19. return value1
  20. end)
  21.  
  22.  
  23. game.Workspace.Events1.Backwards.OnServerEvent:connect(function()
  24. print("B")
  25. if value1< maxspeed then
  26. value1 = value1-25
  27. end
  28. if value1 == maxspeed then
  29. value1 = value1-25
  30. end
  31. script.Parent.Parent.Driving.Value = true
  32.  
  33. script.Parent.Parent.Left.Value = false
  34. script.Parent.Parent.Right.Value = false
  35. return value1
  36. end)
  37.  
  38.  
  39. game.Workspace.Events1.StarboardTurn.OnServerEvent:connect(function()
  40. --script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.045,0)
  41. script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
  42. script.Parent.Parent.Driving.Value = true
  43. script.Parent.Parent.Right.Value = true
  44. script.Parent.Parent.Left.Value = false
  45. script.Parent.BodyAngularVelocity.AngularVelocity = Vector3.new(0,-0.2,0)
  46. end)
  47. game.Workspace.Events1.PortTurn.OnServerEvent:connect(function()
  48. --script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,.045,0)
  49. script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
  50. script.Parent.Parent.Driving.Value = true
  51. script.Parent.Parent.Left.Value = true
  52. script.Parent.Parent.Right.Value = false
  53. print("NEG")
  54. script.Parent.BodyAngularVelocity.AngularVelocity = Vector3.new(0,0.2,0)
  55. end)
  56.  
  57. game.Workspace.Events1.StopTurn.OnServerEvent:connect(function()
  58. script.Parent.BodyAngularVelocity.AngularVelocity = Vector3.new(0,0,0)
  59. end)
  60.  
  61.  
  62. game.Workspace.Events1.Reset.OnServerEvent:connect(function()
  63. script.Parent.BodyAngularVelocity.AngularVelocity = Vector3.new(0,0,0)
  64. value1 = 0
  65. end)
  66.  
  67.  
  68.  
  69. while wait(0.1) do
  70. script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
  71. end
Advertisement
Add Comment
Please, Sign In to add comment