Advertisement
Kaid3n22

Vehicle Tycoon Gui

Sep 3rd, 2020
841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.50 KB | None | 0 0
  1. local haxgui = Instance.new("ScreenGui")
  2. local haxframe = Instance.new("Frame")
  3. local haxlabel = Instance.new("TextLabel")
  4. local haxopen = Instance.new("TextButton")
  5. local haxclose = Instance.new("TextButton")
  6. local coins = Instance.new("TextButton")
  7. local autofarm = Instance.new("TextButton")
  8. local carspeed = Instance.new("TextButton")
  9. local carframe = Instance.new("Frame")
  10. local closecar = Instance.new("TextButton")
  11. local carbox = Instance.new("TextBox")
  12. local changespeed = Instance.new("TextButton")
  13. local carlabel = Instance.new("TextLabel")
  14. local speedvalue = Instance.new("IntValue")
  15. local part1 = Instance.new("Part")
  16. local part2 = Instance.new("Part")
  17. local farming = false
  18. local tfarming = false
  19.  
  20. part1.Position = Vector3.new(-4000,250,-4000)
  21. part1.Anchored = true
  22. part1.Size = Vector3.new(50000,1,50000)
  23.  
  24. part2.Position = Vector3.new(4000,250,4000)
  25. part2.Anchored = true
  26. part2.Size = Vector3.new(50000,1,50000)
  27.  
  28.  
  29. haxgui.Name = "HaxGui"
  30. haxgui.Parent = game.Players.LocalPlayer.PlayerGui
  31. haxgui.ResetOnSpawn = false
  32.  
  33. haxopen.Name = "HaxOpen"
  34. haxopen.Parent = haxgui
  35. haxopen.BackgroundColor3 = Color3.new(0,0,255)
  36. haxopen.Position = UDim2.new(0,0,0.75,0)
  37. haxopen.Size = UDim2.new(0.15,0,0.075,0)
  38. haxopen.Text = "Open"
  39. haxopen.TextScaled = true
  40. haxopen.TextColor3 = Color3.new(255,0,255)
  41. haxopen.TextStrokeTransparency = 0
  42.  
  43. haxframe.Name = "HaxFrame"
  44. haxframe.Parent = haxgui
  45. haxframe.BackgroundColor3 = Color3.new(0,0,255)
  46. haxframe.Position = UDim2.new(0.35,0,0.25,0)
  47. haxframe.Size = UDim2.new(0.3,0,0.5,0)
  48. haxframe.Visible = false
  49.  
  50. haxclose.Name = "HaxClose"
  51. haxclose.Parent = haxframe
  52. haxclose.BackgroundColor3 = Color3.new(255,0,0)
  53. haxclose.Position = UDim2.new(0.94,0,0.01,0)
  54. haxclose.Size = UDim2.new(0.05,0,0.05,0)
  55. haxclose.Text = "X"
  56. haxclose.TextScaled = true
  57. haxclose.TextColor3 = Color3.new(255,255,255)
  58. haxclose.TextStrokeTransparency = 0
  59.  
  60. haxlabel.Name = "HaxLabel"
  61. haxlabel.Parent = haxframe
  62. haxlabel.BackgroundTransparency = 1
  63. haxlabel.Position = UDim2.new(0,0,0,0)
  64. haxlabel.Size = UDim2.new(1,0,0.1,0)
  65. haxlabel.Text = "Hax Gui"
  66. haxlabel.TextScaled = true
  67. haxlabel.TextColor3 = Color3.new(255,255,255)
  68. haxlabel.TextStrokeTransparency = 0
  69.  
  70. coins.Name = "Coins"
  71. coins.Parent = haxframe
  72. coins.BackgroundColor3 = Color3.new(50,255,0)
  73. coins.Position = UDim2.new(0.1,0,0.15,0)
  74. coins.Size = UDim2.new(0.3,0,0.1,0)
  75. coins.Text = "TP Coins To You (Wait For Respawn)"
  76. coins.TextScaled = true
  77.  
  78. carspeed.Name = "CarSpeed"
  79. carspeed.Parent = haxframe
  80. carspeed.BackgroundColor3 = Color3.new(50,255,0)
  81. carspeed.Position = UDim2.new(0.6,0,0.15,0)
  82. carspeed.Size = UDim2.new(0.3,0,0.1,0)
  83. carspeed.Text = "Change Car Speed"
  84. carspeed.TextScaled = true
  85.  
  86. autofarm.Name = "Autofarm"
  87. autofarm.Parent = haxframe
  88. autofarm.BackgroundColor3 = Color3.new(50,255,0)
  89. autofarm.Position = UDim2.new(0.1,0,0.3,0)
  90. autofarm.Size = UDim2.new(0.3,0,0.1,0)
  91. autofarm.Text = "Autofarm: Off"
  92. autofarm.TextScaled = true
  93.  
  94. carframe.Name = "CarFrame"
  95. carframe.Parent = haxgui
  96. carframe.BackgroundColor3 = Color3.new(0,0,255)
  97. carframe.Position = UDim2.new(0.35,0,0.25,0)
  98. carframe.Size = UDim2.new(0.3,0,0.5,0)
  99. carframe.Visible = false
  100.  
  101. carlabel.Name = "CarLabel"
  102. carlabel.Parent = carframe
  103. carlabel.BackgroundTransparency = 1
  104. carlabel.Position = UDim2.new(0,0,0,0)
  105. carlabel.Size = UDim2.new(1,0,0.1,0)
  106. carlabel.Text = "Car Speed"
  107. carlabel.TextScaled = true
  108. carlabel.TextColor3 = Color3.new(255,255,255)
  109. carlabel.TextStrokeTransparency = 0
  110.  
  111. closecar.Name = "CarClose"
  112. closecar.Parent = carframe
  113. closecar.BackgroundColor3 = Color3.new(255,0,0)
  114. closecar.Position = UDim2.new(0.94,0,0.01,0)
  115. closecar.Size = UDim2.new(0.05,0,0.05,0)
  116. closecar.Text = "X"
  117. closecar.TextScaled = true
  118. closecar.TextColor3 = Color3.new(255,255,255)
  119. closecar.TextStrokeTransparency = 0
  120.  
  121. carbox.Name = "CarBox"
  122. carbox.Parent = carframe
  123. carbox.BackgroundColor3 = Color3.new(255,255,255)
  124. carbox.BorderSizePixel = 0
  125. carbox.Position = UDim2.new(0.25,0,0.15,0)
  126. carbox.Size = UDim2.new(0.5,0,0.1,0)
  127. carbox.Text = ""
  128. carbox.PlaceholderText = "Speed"
  129. carbox.TextScaled = true
  130.  
  131. changespeed.Name = "ChangeSpeed"
  132. changespeed.Parent = carframe
  133. changespeed.BackgroundColor3 = Color3.new(50,255,0)
  134. changespeed.Position = UDim2.new(0.35,0,0.3,0)
  135. changespeed.Size = UDim2.new(0.3,0,0.1,0)
  136. changespeed.Text = "Change Speed"
  137. changespeed.TextScaled = true
  138.  
  139. speedvalue.Name = "SpeedValue"
  140. speedvalue.Parent = carframe
  141.  
  142. haxopen.MouseButton1Down:Connect(function()
  143.     haxframe.Visible = not haxframe.Visible
  144.     carframe.Visible = false
  145. end)
  146.  
  147. haxclose.MouseButton1Down:Connect(function()
  148.     haxframe.Visible = false
  149. end)
  150.  
  151. coins.MouseButton1Down:Connect(function()
  152.     for i,v in pairs(game.Workspace.CoinEvent.Coins:GetChildren()) do
  153.         v.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  154.     end
  155. end)
  156.  
  157. carspeed.MouseButton1Down:Connect(function()
  158.     carframe.Visible = true
  159.     haxframe.Visible = false
  160. end)
  161.  
  162. closecar.MouseButton1Down:Connect(function()
  163.     carframe.Visible = false
  164.     haxframe.Visible = true
  165. end)
  166.  
  167. changespeed.MouseButton1Down:Connect(function()
  168.     local speed = carbox.Text
  169.     local name = game.Players.LocalPlayer.Name
  170.     speedvalue.Value = speed * speed * speed
  171.     game:GetService("Workspace").Vehicles[name].Stats.MaxSpeed.Value = speed
  172.     game:GetService("Workspace").Vehicles[name].Stats.AccelerateTorque.Value = speedvalue.Value
  173. end)
  174.  
  175. autofarm.MouseButton1Down:Connect(function()
  176.     local car = game.Workspace.Vehicles:FindFirstChild(game.Players.LocalPlayer.Name)
  177.     if car then
  178.         farming = not farming
  179.         if farming then
  180.             autofarm.Text = "Autofarm: On"
  181.             part1.Parent = game.Workspace
  182.             part2.Parent = game.Workspace
  183.         else
  184.             autofarm.Text = "Autofarm: Off"
  185.             part1.Parent = game.ReplicatedStorage
  186.             part2.Parent = game.ReplicatedStorage
  187.         end
  188.         while farming do
  189.             car:SetPrimaryPartCFrame(CFrame.new(part1.Position + Vector3.new(0, 1000000000, 0)))
  190.             wait(1.5)
  191.             car:SetPrimaryPartCFrame(CFrame.new(part2.Position + Vector3.new(0, 1000000000, 0)))
  192.             wait(1.5)
  193.         end
  194.     else
  195.         autofarm.Text = "Car not found"
  196.         wait(2)
  197.         if autofarm then
  198.             if car then
  199.                 autofarm.Text = "Autofarm: On"
  200.             else
  201.                 autofarm = false
  202.                 autofarm.Text = "Autofarm: Off"
  203.             end
  204.         else
  205.             autofarm.Text = "Autofarm: Off"
  206.         end
  207.     end
  208. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement