Advertisement
AntonErlandsson

Roblox Vehicle Simulator AFK

Aug 26th, 2018
1,754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. --VEHICLE SIMULATOR AFK
  2. --/e racingmode /e stop
  3.  
  4.  
  5.  
  6. local plr = game.Players.LocalPlayer
  7. local inftoggle = false
  8. function getvehicle()
  9. for i,v in pairs(game.Workspace.Vehicles:GetChildren()) do
  10. if v:IsA("Model") then
  11. if v.owner.Value == plr.Name then
  12. return v
  13. end
  14. end
  15. end
  16. return nil
  17. end
  18. function hint(txt, t)
  19. if t then
  20. local h = Instance.new("Hint",plr.PlayerGui)
  21. h.Text = txt
  22. wait(t)
  23. h:remove()
  24. else
  25. local h = Instance.new("Hint",plr.PlayerGui)
  26. h.Text = txt
  27. wait(2)
  28. h:remove()
  29. end
  30. end
  31.  
  32. plr.Chatted:connect(function(msg)
  33. if msg:lower():sub(1,10) == "/e toggle:" then
  34. local ins = msg:lower():sub(11)
  35. local vehicle = getvehicle()
  36. if vehicle then
  37. if ins == "infnitro" then
  38. if inftoggle == true then
  39. inftoggle = false
  40. hint("(-)Disabled Infinite Nitro!(-)")
  41. else
  42. inftoggle = true
  43. hint("(+)Enabled Infinite Nitro!(+)")
  44. end
  45. end
  46. else
  47. hint("(-)You do not have a vehicle spawned!(-)")
  48. end
  49. elseif msg:lower():sub(1,14) == "/e nitrospeed:" then
  50. local num = msg:sub(15)
  51. local vehicle = getvehicle()
  52. if vehicle then
  53. vehicle.Handling.Nitro.NitroSpeed.Value = tonumber(num)
  54. else
  55. hint("(-)You do not have a vehicle spawned!(-)")
  56. end
  57. elseif msg:lower():sub(1,14) == "/e stop" then
  58. local num = msg:sub(1,15)
  59. local vehicle = getvehicle()
  60. if vehicle then
  61. vehicle.Chassis.VehicleSeat.Anchored = true
  62. else
  63. hint("(-)You do not have a vehicle spawned!(-)")
  64. end
  65. elseif msg:lower():sub(1,14) == "/e nitroforce:" then
  66. local num = msg:sub(1,15)
  67. local vehicle = getvehicle()
  68. if vehicle then
  69. vehicle.Handling.Nitro.NitroForce.Value = tonumber(num)
  70. else
  71. hint("(-)You do not have a vehicle spawned!(-)")
  72. end
  73. elseif msg:lower():sub(1,12) == "/e maxspeed:" then
  74. local num = msg:sub(13)
  75. local vehicle = getvehicle()
  76. if vehicle then
  77. vehicle.Handling.MaxSpeed.Value = tonumber(num)
  78. else
  79. hint("(-)You do not have a vehicle spawned!(-)")
  80. end
  81. elseif msg:lower():sub(1,10) == "/e torque:" then
  82. local num = msg:sub(11)
  83. local vehicle = getvehicle()
  84. if vehicle then
  85. vehicle.Handling.Torque.Value = tonumber(num)
  86. else
  87. hint("(-)You do not have a vehicle spawned!(-)")
  88. end
  89. elseif msg:lower():sub(1,12) == "/e friction:" then
  90. local num = msg:sub(13)
  91. local vehicle = getvehicle()
  92. if vehicle then
  93. vehicle.Handling.FrictionOffroad.Value = tonumber(num)
  94. vehicle.Handling.FrictionRoad.Value = tonumber(num)
  95. else
  96. hint("(-)You do not have a vehicle spawned!(-)")
  97. end
  98. elseif msg:lower():sub(1,13) == "/e racingmode" then
  99. local vehicle = getvehicle()
  100. if vehicle then
  101. han = vehicle.Handling
  102. han.MaxSpeed.Value = 10000
  103. han.Torque.Value = 30000
  104. han.SteeringRadiusConstant.Value = 12000
  105. han.FrictionOffroad.Value = 200
  106. han.FrictionRoad.Value = 200
  107. han.Nitro.NitroSpeed.Value = 300
  108. han.Nitro.NitroForce.Value = 8000
  109. han.TurboJump.TurboJumpHeight.Value = 300
  110. inftoggle = true
  111. else
  112. hint("(-)You do not have a vehicle spawned!(-)")
  113. end
  114. end
  115. end)
  116. wait(0.5)
  117. while inftoggle == true do
  118. wait(0.02)
  119. local vehicle = getvehicle()
  120. if vehicle then
  121. vehicle.Handling.Nitro.NitroAmount.Value = 250
  122. end
  123. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement