Advertisement
GamingCrew

Vehicle Simulator GUI - Gaming Crew

May 8th, 2018
3,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local TextLabel = Instance.new("TextLabel")
  6. local TextButton = Instance.new("TextButton")
  7. local TextLabel_2 = Instance.new("TextLabel")
  8. local TextLabel_3 = Instance.new("TextLabel")
  9.  
  10. -- Properties
  11.  
  12. ScreenGui.Parent = game.CoreGui
  13. Frame.Draggable = true
  14. Frame.Active = true
  15.  
  16. Frame.Parent = ScreenGui
  17. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  18. Frame.BorderColor3 = Color3.new(0, 0, 0)
  19. Frame.Position = UDim2.new(0.65749234, 0, 0.0103806229, 0)
  20. Frame.Size = UDim2.new(0, 336, 0, 395)
  21.  
  22. TextLabel.Parent = Frame
  23. TextLabel.BackgroundColor3 = Color3.new(0.666667, 0, 0)
  24. TextLabel.Size = UDim2.new(0, 336, 0, 54)
  25. TextLabel.Font = Enum.Font.Code
  26. TextLabel.Text = "Vehicle Simulator Improved GUI"
  27. TextLabel.TextSize = 14
  28.  
  29. TextButton.Parent = Frame
  30. TextButton.BackgroundColor3 = Color3.new(0.666667, 0, 0)
  31. TextButton.Position = UDim2.new(0.299107134, 0, 0.194936723, 0)
  32. TextButton.Size = UDim2.new(0, 135, 0, 50)
  33. TextButton.Font = Enum.Font.ArialBold
  34. TextButton.Text = "Admin Commands"
  35. TextButton.TextSize = 14
  36.  
  37. TextLabel_2.Parent = Frame
  38. TextLabel_2.BackgroundColor3 = Color3.new(0.666667, 0, 0)
  39. TextLabel_2.Position = UDim2.new(0, 0, 0.508860767, 0)
  40. TextLabel_2.Size = UDim2.new(0, 336, 0, 159)
  41. TextLabel_2.Font = Enum.Font.SourceSans
  42. TextLabel_2.Text = "Commands for admin:\n/e maxspeed:(N) *Sets the maxspeed for your car to (N)\n/e torque:(N) *Sets the torque for your car to (N)\n/e toggle:infnitro *Toggles infinite nitro (Dont add any arguments it will toggle it on itsself according to the set bool)\n/e nitrospeed:(N) *Sets the nitro speed for your car to (N)\n/e nitroforce:(N) *Sets the nitro force for your car to (N)\n/e racingmode *Makes your car's setting fitted for winning almost any race!!!"
  43. TextLabel_2.TextSize = 14
  44.  
  45. TextLabel_3.Parent = Frame
  46. TextLabel_3.BackgroundColor3 = Color3.new(1, 1, 1)
  47. TextLabel_3.Position = UDim2.new(0.267857134, 0, 0.38481012, 0)
  48. TextLabel_3.Size = UDim2.new(0, 157, 0, 28)
  49. TextLabel_3.Font = Enum.Font.SourceSans
  50. TextLabel_3.Text = "Script X!!!"
  51. TextLabel_3.TextSize = 14
  52.  
  53. -- Scripts
  54.  
  55. TextButton.MouseButton1Down:connect(function()
  56. local plr = game.Players.LocalPlayer
  57. local inftoggle = false
  58. function getvehicle()
  59. for i,v in pairs(game.Workspace.Vehicles:GetChildren()) do
  60. if v:IsA("Model") then
  61. if v.owner.Value == plr.Name then
  62. return v
  63. end
  64. end
  65. end
  66. return nil
  67. end
  68. function hint(txt, t)
  69. if t then
  70. local h = Instance.new("Hint",plr.PlayerGui)
  71. h.Text = txt
  72. wait(t)
  73. h:remove()
  74. else
  75. local h = Instance.new("Hint",plr.PlayerGui)
  76. h.Text = txt
  77. wait(2)
  78. h:remove()
  79. end
  80. end
  81.  
  82. plr.Chatted:connect(function(msg)
  83. if msg:lower():sub(1,10) == "/e toggle:" then
  84. local ins = msg:lower():sub(11)
  85. local vehicle = getvehicle()
  86. if vehicle then
  87. if ins == "infnitro" then
  88. if inftoggle == true then
  89. inftoggle = false
  90. hint("(-)Disabled Infinite Nitro!(-)")
  91. else
  92. inftoggle = true
  93. hint("(+)Enabled Infinite Nitro!(+)")
  94. end
  95. end
  96. else
  97. hint("(-)You do not have a vehicle spawned!(-)")
  98. end
  99. elseif msg:lower():sub(1,14) == "/e nitrospeed:" then
  100. local num = msg:sub(15)
  101. local vehicle = getvehicle()
  102. if vehicle then
  103. vehicle.Handling.Nitro.NitroSpeed.Value = tonumber(num)
  104. else
  105. hint("(-)You do not have a vehicle spawned!(-)")
  106. end
  107. elseif msg:lower():sub(1,14) == "/e nitroforce:" then
  108. local num = msg:sub(1,15)
  109. local vehicle = getvehicle()
  110. if vehicle then
  111. vehicle.Handling.Nitro.NitroForce.Value = tonumber(num)
  112. else
  113. hint("(-)You do not have a vehicle spawned!(-)")
  114. end
  115. elseif msg:lower():sub(1,12) == "/e maxspeed:" then
  116. local num = msg:sub(13)
  117. local vehicle = getvehicle()
  118. if vehicle then
  119. vehicle.Handling.MaxSpeed.Value = tonumber(num)
  120. else
  121. hint("(-)You do not have a vehicle spawned!(-)")
  122. end
  123. elseif msg:lower():sub(1,10) == "/e torque:" then
  124. local num = msg:sub(11)
  125. local vehicle = getvehicle()
  126. if vehicle then
  127. vehicle.Handling.Torque.Value = tonumber(num)
  128. else
  129. hint("(-)You do not have a vehicle spawned!(-)")
  130. end
  131. elseif msg:lower():sub(1,12) == "/e friction:" then
  132. local num = msg:sub(13)
  133. local vehicle = getvehicle()
  134. if vehicle then
  135. vehicle.Handling.FrictionOffroad.Value = tonumber(num)
  136. vehicle.Handling.FrictionRoad.Value = tonumber(num)
  137. else
  138. hint("(-)You do not have a vehicle spawned!(-)")
  139. end
  140. elseif msg:lower():sub(1,13) == "/e racingmode" then
  141. local vehicle = getvehicle()
  142. if vehicle then
  143. han = vehicle.Handling
  144. han.MaxSpeed.Value = 10000
  145. han.Torque.Value = 20000
  146. han.SteeringRadiusConstant.Value = 12000
  147. han.FrictionOffroad.Value = 200
  148. han.FrictionRoad.Value = 200
  149. han.Nitro.NitroSpeed.Value = 300
  150. han.Nitro.NitroForce.Value = 8000
  151. inftoggle = true
  152. else
  153. hint("(-)You do not have a vehicle spawned!(-)")
  154. end
  155. end
  156. end)
  157. wait(0.5)
  158. while inftoggle == true do
  159. wait(0.02)
  160. local vehicle = getvehicle()
  161. if vehicle then
  162. vehicle.Handling.Nitro.NitroAmount.Value = 250
  163. end
  164. end
  165. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement