Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currentspeed = "600"
- mouse = game.Players.LocalPlayer:GetMouse()
- -- Objects
- local VehicleSimGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local BackgroundImage = Instance.new("ImageLabel")
- local BackgroundFrame = Instance.new("Frame")
- local BackgroundFrame_2 = Instance.new("Frame")
- local switchvehicle = Instance.new("TextButton")
- local changespeed = Instance.new("TextButton")
- local vehiclespeedinput = Instance.new("TextBox")
- local switchvehicle_2 = Instance.new("TextButton")
- local exit = Instance.new("TextButton")
- local open = Instance.new("TextButton")
- local Credit = Instance.new("TextLabel")
- local Credit2 = Instance.new("TextLabel")
- local IntroWait = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local IntroFrame = Instance.new("Frame")
- local Square = Instance.new("TextLabel")
- -- Properties
- VehicleSimGui.Name = "VehicleSimGui"
- VehicleSimGui.Parent = game.CoreGui
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = VehicleSimGui
- MainFrame.Active = true
- MainFrame.BackgroundColor3 = Color3.new(0.415686, 0.415686, 0.415686)
- MainFrame.BorderSizePixel = 0
- MainFrame.Position = UDim2.new(0.19284603, 0, 0.259906769, 0)
- MainFrame.Selectable = true
- MainFrame.Size = UDim2.new(0, 832, 0, 430)
- MainFrame.Visible = false
- MainFrame.Draggable = true
- BackgroundImage.Name = "BackgroundImage"
- BackgroundImage.Parent = MainFrame
- BackgroundImage.BackgroundColor3 = Color3.new(1, 1, 1)
- BackgroundImage.BackgroundTransparency = 1
- BackgroundImage.BorderSizePixel = 0
- BackgroundImage.Size = UDim2.new(0, 835, 0, 425)
- BackgroundImage.Image = "rbxassetid://1882514406"
- BackgroundImage.ImageTransparency = 0.5
- BackgroundFrame.Name = "BackgroundFrame"
- BackgroundFrame.Parent = MainFrame
- BackgroundFrame.BackgroundColor3 = Color3.new(0.0352941, 0.643137, 0.827451)
- BackgroundFrame.BorderSizePixel = 0
- BackgroundFrame.Position = UDim2.new(0.000548228621, 0, 0.987786651, 0)
- BackgroundFrame.Size = UDim2.new(0, 835, 0, 5)
- BackgroundFrame_2.Name = "BackgroundFrame"
- BackgroundFrame_2.Parent = MainFrame
- BackgroundFrame_2.BackgroundColor3 = Color3.new(0.0352941, 0.643137, 0.827451)
- BackgroundFrame_2.BorderSizePixel = 0
- BackgroundFrame_2.Position = UDim2.new(0.000548228621, 0, -0.000585436821, 0)
- BackgroundFrame_2.Size = UDim2.new(0, 835, 0, 5)
- switchvehicle.Name = "switchvehicle"
- switchvehicle.Parent = MainFrame
- switchvehicle.BackgroundColor3 = Color3.new(0.0980392, 0.803922, 1)
- switchvehicle.BorderSizePixel = 0
- switchvehicle.Position = UDim2.new(0.106635079, 0, 0.260465115, 0)
- switchvehicle.Size = UDim2.new(0, 200, 0, 50)
- switchvehicle.Font = Enum.Font.ArialBold
- switchvehicle.Text = "Switch Vehicle"
- switchvehicle.TextColor3 = Color3.new(0, 0, 0)
- switchvehicle.TextScaled = true
- switchvehicle.TextSize = 14
- switchvehicle.TextWrapped = true
- changespeed.Name = "changespeed"
- changespeed.Parent = MainFrame
- changespeed.BackgroundColor3 = Color3.new(0.235294, 1, 0.592157)
- changespeed.BorderSizePixel = 0
- changespeed.Position = UDim2.new(0.63625598, 0, 0.555813968, 0)
- changespeed.Size = UDim2.new(0, 200, 0, 50)
- changespeed.Font = Enum.Font.Fantasy
- changespeed.Text = "Change Speed"
- changespeed.TextColor3 = Color3.new(0, 0, 0)
- changespeed.TextScaled = true
- changespeed.TextSize = 14
- changespeed.TextWrapped = true
- vehiclespeedinput.Name = "vehiclespeedinput"
- vehiclespeedinput.Parent = MainFrame
- vehiclespeedinput.BackgroundColor3 = Color3.new(1, 0, 0)
- vehiclespeedinput.BorderSizePixel = 0
- vehiclespeedinput.Position = UDim2.new(0.63625592, 0, 0.260465115, 0)
- vehiclespeedinput.Size = UDim2.new(0, 200, 0, 50)
- vehiclespeedinput.Font = Enum.Font.SourceSansSemibold
- vehiclespeedinput.PlaceholderColor3 = Color3.new(0.968628, 0.968628, 0.968628)
- vehiclespeedinput.PlaceholderText = "Vehicle Speed [Enter]"
- vehiclespeedinput.Text = ""
- vehiclespeedinput.TextColor3 = Color3.new(0, 0, 0)
- vehiclespeedinput.TextScaled = true
- vehiclespeedinput.TextSize = 14
- vehiclespeedinput.TextWrapped = true
- switchvehicle_2.Name = "switchvehicle"
- switchvehicle_2.Parent = MainFrame
- switchvehicle_2.BackgroundColor3 = Color3.new(0.666667, 0, 1)
- switchvehicle_2.BorderSizePixel = 0
- switchvehicle_2.Position = UDim2.new(0.106635079, 0, 0.555813968, 0)
- switchvehicle_2.Size = UDim2.new(0, 200, 0, 50)
- switchvehicle_2.Font = Enum.Font.Highway
- switchvehicle_2.Text = "Start"
- switchvehicle_2.TextColor3 = Color3.new(0, 0, 0)
- switchvehicle_2.TextScaled = true
- switchvehicle_2.TextSize = 14
- switchvehicle_2.TextWrapped = true
- exit.Name = "exit"
- exit.Parent = MainFrame
- exit.BackgroundColor3 = Color3.new(1, 0, 0)
- exit.BorderSizePixel = 0
- exit.Position = UDim2.new(0.946870446, 0, 0, 0)
- exit.Size = UDim2.new(0, 47, 0, 28)
- exit.Font = Enum.Font.SourceSansSemibold
- exit.Text = "-"
- exit.TextColor3 = Color3.new(0, 0, 0)
- exit.TextScaled = true
- exit.TextSize = 14
- exit.TextWrapped = true
- exit.MouseButton1Down:Connect(function()
- MainFrame.Visible = false
- open.Visible = true
- end)
- open.Name = "open"
- open.Parent = VehicleSimGui
- open.BackgroundColor3 = Color3.new(0, 1, 1)
- open.BorderSizePixel = 0
- open.Position = UDim2.new(0, 0, 0, mouse.ViewSizeY/2.2)
- open.Size = UDim2.new(0, 70, 0, 30)
- open.Font = Enum.Font.SourceSansSemibold
- open.Text = "Open"
- open.TextColor3 = Color3.new(0, 0, 0)
- open.TextScaled = true
- open.TextSize = 14
- open.TextWrapped = true
- open.Visible = false
- open.MouseButton1Down:Connect(function()
- MainFrame.Visible = true
- open.Visible = false
- end)
- Credit.Name = "Credit"
- Credit.Parent = MainFrame
- Credit.BackgroundColor3 = Color3.new(1, 1, 1)
- Credit.BackgroundTransparency = 1
- Credit.Position = UDim2.new(0.000600961561, 0, 0.97441864, 0)
- Credit.Size = UDim2.new(0, 289, 0, 2)
- Credit.Font = Enum.Font.SourceSansBold
- Credit.Text = "GUI by StevenDahFish"
- Credit.TextColor3 = Color3.new(1, 1, 1)
- Credit.TextSize = 14
- Credit.TextXAlignment = Enum.TextXAlignment.Left
- Credit2.Name = "Credit2"
- Credit2.Parent = MainFrame
- Credit2.BackgroundColor3 = Color3.new(1, 1, 1)
- Credit2.BackgroundTransparency = 1
- Credit2.Position = UDim2.new(0.65625, 0, 0.97441864, 0)
- Credit2.Size = UDim2.new(0, 289, 0, 2)
- Credit2.Font = Enum.Font.SourceSansBold
- Credit2.Text = "Scripting by Victini"
- Credit2.TextColor3 = Color3.new(1, 1, 1)
- Credit2.TextSize = 14
- Credit2.TextXAlignment = Enum.TextXAlignment.Right
- IntroWait.Name = "IntroWait"
- IntroWait.Parent = MainFrame
- IntroWait.BackgroundColor3 = Color3.new(1, 1, 1)
- IntroWait.Position = UDim2.new(-0.015625, 0, -0.0162790697, 0)
- IntroWait.Size = UDim2.new(0, 859, 0, 446)
- IntroWait.Style = Enum.FrameStyle.DropShadow
- TextLabel.Parent = IntroWait
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0.0419091955, 0, 0.182735428, 0)
- TextLabel.Size = UDim2.new(0, 775, 0, 273)
- TextLabel.Font = Enum.Font.SourceSansBold
- TextLabel.Text = "Wait for intro to end.."
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- IntroFrame.Name = "IntroFrame"
- IntroFrame.Parent = VehicleSimGui
- IntroFrame.BackgroundColor3 = Color3.new(1, 1, 1)
- IntroFrame.BackgroundTransparency = 1
- IntroFrame.Position = UDim2.new(0.202954888, 0, 0.275641024, 0)
- IntroFrame.Size = UDim2.new(0, 764, 0, 385)
- Square.Name = "Square"
- Square.Parent = IntroFrame
- Square.BackgroundColor3 = Color3.new(0.286275, 0.72549, 1)
- Square.BorderSizePixel = 0
- Square.Position = UDim2.new(0.5, -300, 0.5, 450)
- Square.Size = UDim2.new(0, 100, 0, 100)
- Square.Font = Enum.Font.SourceSans
- Square.Text = ""
- Square.TextColor3 = Color3.new(0, 0, 0)
- Square.TextSize = 14
- -- Intro
- local IntroSong = Instance.new("Sound")
- IntroSong.Parent = VehicleSimGui
- IntroSong.Volume = 2
- IntroSong.SoundId = "rbxassetid://247813691"
- IntroSong:Play()
- Square.Visible = true
- Square:TweenPosition(UDim2.new(0.5, -300,0.5, -200),'Out','Linear',0.5)
- wait(1)
- Square:TweenPosition(UDim2.new(0.5, 300,0.5, -200),'Out','Linear',1)
- wait(2)
- Square:TweenPosition(UDim2.new(0.5, 300,0.5, 200),'Out','Linear',0.6)
- wait(1.6)
- Square:TweenPosition(UDim2.new(0.5, -300,0.5, 200),'Out','Linear',0.6)
- wait(2)
- Square:TweenPosition(UDim2.new(0.5, 340,0.5, -207),'Out','Linear',0.5)
- wait(1.8)
- Square.Size = UDim2.new(0, 844,0, 430)
- Square.Position = UDim2.new(0.5, -395,0.5, -206)
- wait(2)
- Square.Visible = false
- MainFrame.Visible = true
- wait(3)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong.Volume = IntroSong.Volume - 0.1
- wait(0.1)
- IntroSong:Remove()
- IntroWait:Remove()
- -- Scripts
- -- now victini this is your part <3
- function getcar()
- for i, v in pairs(game.Workspace.Vehicles:GetChildren()) do
- if v:IsA("Model") then
- for a, b in pairs(v:GetChildren()) do
- if b.Name == "owner" then
- if b.Value == game.Players.LocalPlayer.Name then
- car = v
- break
- end
- end
- end
- end
- end
- end
- function getspeed()
- me = game.Players.LocalPlayer
- cargui = me.PlayerGui.CarGui.Speedometer.Speed
- speed = cargui.Text
- if speed >= currentspeed then
- --false--
- car.Bodykit.CenterOfMass.Nitro.Force = Vector3.new(0, 0, 0)
- else
- --true--
- car.Bodykit.CenterOfMass.Nitro.Force = Vector3.new(0, -150250, 0)
- end
- end
- function ON()
- if car ~= nil then
- a = true
- car:SetPrimaryPartCFrame(CFrame.new(90.6, 59, 898.8))
- car.Bodykit.CenterOfMass.Nitro.Force = Vector3.new(0, -150250, 0)
- while a == true do
- wait(0.25)
- getspeed()
- car:SetPrimaryPartCFrame(CFrame.new(90.6, 59, 898.8))
- wait(0.25)
- car:SetPrimaryPartCFrame(CFrame.new(90.6, 59, 898.8))
- wait(0.25)
- car:SetPrimaryPartCFrame(CFrame.new(90.6, 59, 898.8))
- end
- end
- end
- function OFF()
- car.Bodykit.CenterOfMass.Nitro.Force = Vector3.new(0, 0, 0)
- a = false
- end
- function chspeed(speed)
- currentspeed = speed
- end
- switchvehicle.MouseButton1Down:connect(function()
- getcar()
- end)
- changespeed.MouseButton1Down:connect(function()
- chspeed(vehiclespeedinput.Text)
- end)
- switchvehicle_2.MouseButton1Down:connect(function()
- if switchvehicle_2.Text == "Start" then
- switchvehicle_2.Text = "Stop"
- ON()
- else
- switchvehicle_2.Text = "Start"
- OFF()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment