Advertisement
Guest User

Vehicle Simulator GUI

a guest
May 22nd, 2018
52,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. -- Objects
  2.  
  3. local gui = Instance.new("ScreenGui")
  4. local frame = Instance.new("Frame")
  5. local color = Instance.new("Frame")
  6. local title = Instance.new("TextLabel")
  7. local credits = Instance.new("TextLabel")
  8. local createtp = Instance.new("TextButton")
  9. local speed = Instance.new("TextButton")
  10. local credits_2 = Instance.new("TextLabel")
  11.  
  12. -- Properties
  13.  
  14. gui.Name = "gui"
  15. gui.Parent = game.CoreGui
  16.  
  17. frame.Name = "frame"
  18. frame.Parent = gui
  19. frame.BackgroundColor3 = Color3.new(1, 0.666667, 1)
  20. frame.BorderSizePixel = 0
  21. frame.Position = UDim2.new(0.0113207549, 0, 0.355932206, 0)
  22. frame.Size = UDim2.new(0, 271, 0, 203)
  23. frame.Active = true
  24.  
  25. color.Name = "color"
  26. color.Parent = frame
  27. color.BackgroundColor3 = Color3.new(1, 1, 1)
  28. color.BorderSizePixel = 0
  29. color.Size = UDim2.new(0, 271, 0, 68)
  30.  
  31. title.Name = "title"
  32. title.Parent = color
  33. title.BackgroundColor3 = Color3.new(1, 1, 1)
  34. title.BackgroundTransparency = 1
  35. title.BorderSizePixel = 0
  36. title.Position = UDim2.new(0.1291513, 0, 0, 0)
  37. title.Size = UDim2.new(0, 200, 0, 50)
  38. title.Font = Enum.Font.Highway
  39. title.Text = "Vehicle simulator GUI"
  40. title.TextSize = 30
  41.  
  42. credits.Name = "credits"
  43. credits.Parent = color
  44. credits.BackgroundColor3 = Color3.new(1, 1, 1)
  45. credits.BackgroundTransparency = 1
  46. credits.BorderSizePixel = 0
  47. credits.Position = UDim2.new(0.416974187, 0, 0.5, 0)
  48. credits.Size = UDim2.new(0, 200, 0, 50)
  49. credits.Font = Enum.Font.Highway
  50. credits.Text = "Th3realdylan @Roblox"
  51. credits.TextSize = 20
  52.  
  53. createtp.Name = "createtp"
  54. createtp.Parent = frame
  55. createtp.BackgroundColor3 = Color3.new(1, 1, 1)
  56. createtp.BorderSizePixel = 0
  57. createtp.Position = UDim2.new(0.0258302614, 0, 0.413793087, 0)
  58. createtp.Size = UDim2.new(0, 114, 0, 67)
  59. createtp.Font = Enum.Font.SourceSans
  60. createtp.Text = "Crate TP"
  61. createtp.TextSize = 30
  62.  
  63. speed.Name = "speed"
  64. speed.Parent = frame
  65. speed.BackgroundColor3 = Color3.new(1, 1, 1)
  66. speed.BorderSizePixel = 0
  67. speed.Position = UDim2.new(0.55350554, 0, 0.413793087, 0)
  68. speed.Size = UDim2.new(0, 114, 0, 67)
  69. speed.Font = Enum.Font.SourceSans
  70. speed.Text = "Speed"
  71. speed.TextSize = 30
  72.  
  73. credits_2.Name = "credits"
  74. credits_2.Parent = frame
  75. credits_2.BackgroundColor3 = Color3.new(1, 1, 1)
  76. credits_2.BackgroundTransparency = 1
  77. credits_2.BorderSizePixel = 0
  78. credits_2.Position = UDim2.new(0.127306283, 0, 0.820197046, 0)
  79. credits_2.Size = UDim2.new(0, 200, 0, 50)
  80. credits_2.Font = Enum.Font.Highway
  81. credits_2.Text = "As suggested by Demon#5038\n"
  82. credits_2.TextColor3 = Color3.new(1, 1, 1)
  83. credits_2.TextSize = 20
  84.  
  85. createtp.MouseButton1Down:connect(function()
  86. print("Crate Script created by Demon#5038")
  87.  
  88. local plr = game.Players.LocalPlayer
  89.  
  90. hum = plr.Character.HumanoidRootPart
  91. local descendants = game.Workspace:GetDescendants()
  92.  
  93.  
  94. for index, descendant in pairs(descendants) do
  95. if descendant:IsA("Model") and descendant.DataCost == 52 then
  96. print(descendant)
  97. if descendant.PrimaryPart:IsA("MeshPart") then
  98. print(descendant.Parent.Parent.Name)
  99. descendant.Name = "Lukki02RCrateScript"
  100. end
  101. end
  102. end
  103.  
  104. wait(0.5)
  105.  
  106. hum.CFrame = game.Workspace.Lukki02RCrateScript.PrimaryPart.CFrame + Vector3.new(math.random(10,15), math.random(10,15), math.random(10,15))
  107. end)
  108.  
  109. speed.MouseButton1Down:connect(function()
  110. veh = nil
  111. for i,v in pairs(game.Workspace.Vehicles:GetChildren()) do
  112. if v:IsA("Model") then
  113. if v.owner.Value == game.Players.LocalPlayer.Name then
  114. veh = v
  115. end
  116. end
  117. end
  118.  
  119. if veh then
  120. han = veh.Handling
  121. han.MaxSpeed.Value = 800
  122. han.Torque.Value = 30000
  123. han.SteeringRadiusConstant.Value = 3000
  124. han.FrictionRoad.Value = 200
  125. han.Gears.Value = 7
  126. han.Nitro.NitroSpeed.Value = 500
  127. han.Nitro.NitroForce.Value = 8000
  128. else
  129. print("Unable to find your vehicle!")
  130. end
  131. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement