Advertisement
lygelz23

Vehicle Simulator [TYPICAL_RBLX]

Dec 24th, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.50 KB | None | 0 0
  1. -- Gui made by Typical_RBLX!!
  2. -- $1 to create some gui ;)
  3. --WHITELIST USER & PASS
  4.  
  5. --Whitelist User "hawkTHEgreat"
  6. --Whitelist Pass "hawkeye"
  7.  
  8.  
  9. local VSGUI = Instance.new("ScreenGui")
  10. local logingui = Instance.new("Frame")
  11. local line = Instance.new("Frame")
  12. local x1 = Instance.new("TextButton")
  13. local TextLabel = Instance.new("TextLabel")
  14. local user = Instance.new("TextBox")
  15. local pass = Instance.new("TextBox")
  16. local submit = Instance.new("TextButton")
  17. local maingui = Instance.new("Frame")
  18. local vs = Instance.new("TextButton")
  19. local bar = Instance.new("Frame")
  20. local x2 = Instance.new("TextButton")
  21. local Title = Instance.new("TextLabel")
  22. local CREDITS = Instance.new("TextButton")
  23. local creditsgui = Instance.new("Frame")
  24. local bar_2 = Instance.new("Frame")
  25. local x3 = Instance.new("TextButton")
  26. local Title_2 = Instance.new("TextLabel")
  27. local creditstitle = Instance.new("TextLabel")
  28. local opengui = Instance.new("Frame")
  29. local open = Instance.new("TextButton")
  30.  
  31. --Properties:
  32. VSGUI.Name = "VSGUI"
  33. VSGUI.Parent = game.CoreGui
  34.  
  35. logingui.Name = "logingui"
  36. logingui.Parent = VSGUI
  37. logingui.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  38. logingui.Position = UDim2.new(0.303771704, 0, 0.292929262, 0)
  39. logingui.Size = UDim2.new(0, 407, 0, 188)
  40. logingui.Visible = false
  41. logingui.Active = true
  42. logingui.Draggable = true
  43.  
  44. line.Name = "line"
  45. line.Parent = logingui
  46. line.BackgroundColor3 = Color3.new(0, 0, 0)
  47. line.Position = UDim2.new(0, 0, 0.122340418, 0)
  48. line.Size = UDim2.new(0, 407, 0, 2)
  49.  
  50. x1.Name = "x1"
  51. x1.Parent = logingui
  52. x1.BackgroundColor3 = Color3.new(1, 1, 1)
  53. x1.BackgroundTransparency = 1
  54. x1.Position = UDim2.new(0.928746939, 0, 0, 0)
  55. x1.Size = UDim2.new(0, 29, 0, 23)
  56. x1.Font = Enum.Font.SourceSans
  57. x1.Text = "X"
  58. x1.TextColor3 = Color3.new(1, 1, 1)
  59. x1.TextScaled = true
  60. x1.TextSize = 14
  61. x1.TextWrapped = true
  62. x1.MouseButton1Down:connect(function()
  63. logingui.Visible = false
  64. opengui.Visible = true
  65. end)
  66.  
  67.  
  68. TextLabel.Parent = logingui
  69. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  70. TextLabel.BackgroundTransparency = 1
  71. TextLabel.Position = UDim2.new(-0.0221130252, 0, 0, 0)
  72. TextLabel.Size = UDim2.new(0, 201, 0, 23)
  73. TextLabel.Font = Enum.Font.Arial
  74. TextLabel.Text = "Universal Gui v1.0"
  75. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  76. TextLabel.TextScaled = true
  77. TextLabel.TextSize = 14
  78. TextLabel.TextWrapped = true
  79.  
  80. user.Name = "user"
  81. user.Parent = logingui
  82. user.BackgroundColor3 = Color3.new(0, 0, 0)
  83. user.BorderColor3 = Color3.new(1, 1, 1)
  84. user.BorderSizePixel = 2
  85. user.Position = UDim2.new(0.257985264, 0, 0.308510631, 0)
  86. user.Size = UDim2.new(0, 196, 0, 22)
  87. user.Font = Enum.Font.SourceSans
  88. user.PlaceholderColor3 = Color3.new(1, 1, 1)
  89. user.PlaceholderText = "Whitelist user"
  90. user.Text = ""
  91. user.TextColor3 = Color3.new(1, 1, 1)
  92. user.TextScaled = true
  93. user.TextSize = 14
  94. user.TextWrapped = true
  95.  
  96. pass.Name = "pass"
  97. pass.Parent = logingui
  98. pass.BackgroundColor3 = Color3.new(0, 0, 0)
  99. pass.BorderColor3 = Color3.new(1, 1, 1)
  100. pass.BorderSizePixel = 2
  101. pass.Position = UDim2.new(0.257985264, 0, 0.526595712, 0)
  102. pass.Size = UDim2.new(0, 196, 0, 22)
  103. pass.Font = Enum.Font.SourceSans
  104. pass.PlaceholderColor3 = Color3.new(1, 1, 1)
  105. pass.PlaceholderText = "Whitelist pass"
  106. pass.Text = ""
  107. pass.TextColor3 = Color3.new(1, 1, 1)
  108. pass.TextScaled = true
  109. pass.TextSize = 14
  110. pass.TextWrapped = true
  111.  
  112. submit.Name = "submit"
  113. submit.Parent = logingui
  114. submit.BackgroundColor3 = Color3.new(0, 0, 0)
  115. submit.BorderColor3 = Color3.new(1, 1, 1)
  116. submit.BorderSizePixel = 2
  117. submit.Position = UDim2.new(0.3857494, 0, 0.739361703, 0)
  118. submit.Size = UDim2.new(0, 92, 0, 23)
  119. submit.Font = Enum.Font.SourceSans
  120. submit.Text = "SUBMIT"
  121. submit.TextColor3 = Color3.new(1, 1, 1)
  122. submit.TextScaled = true
  123. submit.TextSize = 14
  124. submit.TextWrapped = true
  125. submit.MouseButton1Down:connect(function()
  126. if user.Text == "hawkTHEgreat" and pass.Text == "hawkeye" then
  127. logingui.Visible = false
  128. maingui.Visible = true
  129. end
  130. end)
  131.  
  132. maingui.Name = "maingui"
  133. maingui.Parent = VSGUI
  134. maingui.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  135. maingui.BorderColor3 = Color3.new(1, 1, 1)
  136. maingui.BorderSizePixel = 3
  137. maingui.Position = UDim2.new(0.404689074, 0, 0.193939388, 0)
  138. maingui.Size = UDim2.new(0, 187, 0, 303)
  139. maingui.Visible = false
  140. maingui.Active = true
  141. maingui.Draggable = true
  142.  
  143. vs.Name = "vs"
  144. vs.Parent = maingui
  145. vs.BackgroundColor3 = Color3.new(0, 0, 0)
  146. vs.BorderColor3 = Color3.new(1, 1, 1)
  147. vs.BorderSizePixel = 2
  148. vs.Position = UDim2.new(0.134412482, 0, 0.208008498, 0)
  149. vs.Size = UDim2.new(0, 137, 0, 134)
  150. vs.Font = Enum.Font.SourceSans
  151. vs.Text = "ACTIVATE"
  152. vs.TextColor3 = Color3.new(1, 1, 1)
  153. vs.TextScaled = true
  154. vs.TextSize = 14
  155. vs.TextWrapped = true
  156. vs.MouseButton1Down:connect(function()
  157. --[[
  158. Fully automatic money/miles farm
  159. TODO:
  160. Add auto respawn vehicle
  161. ]]
  162. local waitTime = 3 --This will be the time it takes (seconds) until your car resets. See line 37
  163. --Do not change anything below :)
  164. local hint = Instance.new('Hint', Workspace) hint.Text = "Vehicle Simulator Autofarm loading..."
  165. local found = false
  166. local go = true
  167.  
  168. function findVehicle() --Finds your vehicle
  169. while not found do --Loops until your vehicle has been found
  170. local vehicles = Workspace.Vehicles:getChildren()
  171. for i=1,#vehicles do
  172. if vehicles[i]:findFirstChild'owner' then
  173. if vehicles[i].owner.Value == game:GetService'Players'.LocalPlayer.Name then -- Found your vehicle
  174. found = true --Setting found to true so loop breaks
  175. vehicle = vehicles[i] -- Declares vehicle variable to your vehicle
  176. vehStats = vehicle.Handling -- Declares vehStats variable to vehicle stats folder
  177. vehStats.MaxSpeed.Value = 800
  178. vehStats.Torque.Value = 100000
  179. vehStats.SteeringRadiusConstant.Value = 120000000
  180. elseif vehicles[i + 1] == nil and not found then
  181. --Autorespawn would go here
  182. hint.Text = "Please spawn and enter your vehicle!" --Your vehicle does not exist in the Workspace
  183. end
  184. end
  185. end
  186. wait(1) --Waiting before checking again so we don't crash
  187. end
  188. wait(2) --We've found the car. Waiting so the car can be properly placed on the highway
  189. vehicle.PrimaryPart = vehicle.Chassis.VehicleSeat
  190. end
  191.  
  192. function farm() --This is where the magic happens :)
  193. hint.Text = "Finished loading! Autofarm initialized."
  194. while wait(waitTime) do --Waits x seconds before resetting car
  195. vehicle:SetPrimaryPartCFrame(CFrame.new(-2470,60,777)) --Teleports vehicle to highway
  196. game:GetService'VirtualUser':SetKeyUp("w") --Resets W key
  197. game:GetService'VirtualUser':SetKeyDown("w") --Presses W key to go forward
  198. end
  199. end
  200. findVehicle() --Calls the findVehicle function
  201. while go do
  202. if not pcall(farm()) then --Calls farm function & checks for errors
  203. found = false --If it errors, it sets found to false and continues looking for your vehicle.
  204. findVehicle()
  205. end
  206. end
  207. end)
  208.  
  209. bar.Name = "bar"
  210. bar.Parent = maingui
  211. bar.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  212. bar.BorderColor3 = Color3.new(1, 1, 1)
  213. bar.BorderSizePixel = 3
  214. bar.Position = UDim2.new(-0.00172805786, 0, -0.116291612, 0)
  215. bar.Size = UDim2.new(0, 187, 0, 24)
  216.  
  217. x2.Name = "x2"
  218. x2.Parent = maingui
  219. x2.BackgroundColor3 = Color3.new(0, 0, 0)
  220. x2.BorderColor3 = Color3.new(1, 1, 1)
  221. x2.BorderSizePixel = 0
  222. x2.Position = UDim2.new(-0.00462496281, 0, -0.110885866, 0)
  223. x2.Size = UDim2.new(0, 26, 0, 22)
  224. x2.Font = Enum.Font.SourceSans
  225. x2.Text = "X"
  226. x2.TextColor3 = Color3.new(1, 1, 1)
  227. x2.TextScaled = true
  228. x2.TextSize = 14
  229. x2.TextWrapped = true
  230. x2.MouseButton1Down:connect(function()
  231. maingui.Visible = false
  232. logingui.Visible = true
  233. end)
  234.  
  235. Title.Name = "Title"
  236. Title.Parent = maingui
  237. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  238. Title.BackgroundTransparency = 1
  239. Title.Position = UDim2.new(0.130708039, 0, -0.111559972, 0)
  240. Title.Size = UDim2.new(0, 162, 0, 22)
  241. Title.Font = Enum.Font.Arial
  242. Title.Text = "Universal Gui"
  243. Title.TextColor3 = Color3.new(1, 1, 1)
  244. Title.TextScaled = true
  245. Title.TextSize = 14
  246. Title.TextWrapped = true
  247.  
  248. CREDITS.Name = "CREDITS"
  249. CREDITS.Parent = maingui
  250. CREDITS.BackgroundColor3 = Color3.new(0, 0, 0)
  251. CREDITS.BorderColor3 = Color3.new(1, 1, 1)
  252. CREDITS.BorderSizePixel = 2
  253. CREDITS.Position = UDim2.new(-0.00462496327, 0, 0.943982244, 0)
  254. CREDITS.Size = UDim2.new(0, 58, 0, 16)
  255. CREDITS.Font = Enum.Font.SourceSans
  256. CREDITS.Text = "Credits"
  257. CREDITS.TextColor3 = Color3.new(1, 1, 1)
  258. CREDITS.TextScaled = true
  259. CREDITS.TextSize = 14
  260. CREDITS.TextWrapped = true
  261. CREDITS.MouseButton1Down:connect(function()
  262. creditsgui.Visible = true
  263. end)
  264.  
  265. creditsgui.Name = "credits gui"
  266. creditsgui.Parent = maingui
  267. creditsgui.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  268. creditsgui.BorderColor3 = Color3.new(1, 1, 1)
  269. creditsgui.BorderSizePixel = 3
  270. creditsgui.Position = UDim2.new(-1.00707567, 0, 0.685688615, 0)
  271. creditsgui.Size = UDim2.new(0, 163, 0, 95)
  272. creditsgui.Visible = false
  273.  
  274. bar_2.Name = "bar"
  275. bar_2.Parent = creditsgui
  276. bar_2.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  277. bar_2.BorderColor3 = Color3.new(1, 1, 1)
  278. bar_2.BorderSizePixel = 3
  279. bar_2.Position = UDim2.new(-0.00172808126, 0, -0.116291568, 0)
  280. bar_2.Size = UDim2.new(0, 163, 0, 24)
  281.  
  282. x3.Name = "x3"
  283. x3.Parent = creditsgui
  284. x3.BackgroundColor3 = Color3.new(0, 0, 0)
  285. x3.BorderColor3 = Color3.new(1, 1, 1)
  286. x3.BorderSizePixel = 0
  287. x3.Position = UDim2.new(-0.00462496281, 0, -0.110885866, 0)
  288. x3.Size = UDim2.new(0, 26, 0, 22)
  289. x3.Font = Enum.Font.SourceSans
  290. x3.Text = "X"
  291. x3.TextColor3 = Color3.new(1, 1, 1)
  292. x3.TextScaled = true
  293. x3.TextSize = 14
  294. x3.TextWrapped = true
  295. x3.MouseButton1Down:connect(function()
  296. creditsgui.Visible = false
  297. end)
  298.  
  299. Title_2.Name = "Title"
  300. Title_2.Parent = creditsgui
  301. Title_2.BackgroundColor3 = Color3.new(1, 1, 1)
  302. Title_2.BackgroundTransparency = 1
  303. Title_2.Position = UDim2.new(0.113910511, 0, -0.111559898, 0)
  304. Title_2.Size = UDim2.new(0, 141, 0, 22)
  305. Title_2.Font = Enum.Font.Arial
  306. Title_2.Text = "Universal Gui"
  307. Title_2.TextColor3 = Color3.new(1, 1, 1)
  308. Title_2.TextScaled = true
  309. Title_2.TextSize = 14
  310. Title_2.TextWrapped = true
  311.  
  312. creditstitle.Name = "creditstitle"
  313. creditstitle.Parent = creditsgui
  314. creditstitle.BackgroundColor3 = Color3.new(1, 1, 1)
  315. creditstitle.BackgroundTransparency = 1
  316. creditstitle.Position = UDim2.new(0.0648307577, 0, 0.309492558, 0)
  317. creditstitle.Size = UDim2.new(0, 141, 0, 48)
  318. creditstitle.Font = Enum.Font.Arial
  319. creditstitle.Text = "Gui made by Typical_RBLX"
  320. creditstitle.TextColor3 = Color3.new(0.333333, 1, 0)
  321. creditstitle.TextScaled = true
  322. creditstitle.TextSize = 14
  323. creditstitle.TextWrapped = true
  324.  
  325. opengui.Name = "opengui"
  326. opengui.Parent = VSGUI
  327. opengui.BackgroundColor3 = Color3.new(0.188235, 0.188235, 0.188235)
  328. opengui.BorderColor3 = Color3.new(1, 1, 1)
  329. opengui.BorderSizePixel = 2
  330. opengui.Position = UDim2.new(0, 0, 0.929292977, 0)
  331. opengui.Size = UDim2.new(0, 95, 0, 23)
  332.  
  333. open.Name = "open"
  334. open.Parent = opengui
  335. open.BackgroundColor3 = Color3.new(0, 0, 0)
  336. open.BackgroundTransparency = 1
  337. open.BorderColor3 = Color3.new(1, 1, 1)
  338. open.BorderSizePixel = 2
  339. open.Size = UDim2.new(0, 95, 0, 23)
  340. open.Font = Enum.Font.SourceSans
  341. open.Text = "Open"
  342. open.TextColor3 = Color3.new(1, 1, 1)
  343. open.TextScaled = true
  344. open.TextSize = 14
  345. open.TextWrapped = true
  346. open.MouseButton1Down:connect(function()
  347. logingui.Visible = true
  348. opengui.Visible = false
  349. end)
  350.  
  351. --Created by Typical_RBLX
  352. --Typical D Great(YT)#8977
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement