Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Fuctions
- function findcar()
- for i,v in pairs(game.workspace.Vehicles:getChildren()) do
- if v:findFirstChild("owner") then
- if v.owner.Value == game.Players.LocalPlayer.Name then
- return v
- end
- end
- end
- end
- function tp(x, y, z, time)
- findcar():SetPrimaryPartCFrame(CFrame.new(x, y + 10, z))
- print(x.." "..y.." "..z)
- wait(time)
- end
- function race(laps, name, time)
- for k = 1, laps do
- SecondCP = nil
- for i,v in pairs(game.workspace.race_checkpoints:FindFirstChild(name, true):GetChildren()) do
- if v.Name == "Checkpoint_2" then
- SecondCP = v
- end
- if v.Name == "Checkpoint_1" then
- if SecondCP == nil then
- x = v.Position.x
- y = v.Position.y
- z = v.Position.z
- tp(x, y, z, time)
- else
- x = v.Position.x
- y = v.Position.y
- z = v.Position.z
- tp(x, y, z, time)
- x = SecondCP.Position.x
- y = SecondCP.Position.y
- z = SecondCP.Position.z
- tp(x, y, z, time)
- end
- end
- if v.Name ~= "Checkpoint_1" and v.Name ~= "Checkpoint_2" then
- x = v.Position.x
- y = v.Position.y
- z = v.Position.z
- tp(x, y, z, time)
- end
- end
- end
- end
- -- Gui
- local library = loadstring(game:HttpGet("https://pastebin.com/raw/eWKgbdix", true))()
- local w = library:CreateWindow('Cool Stuff 🚧')
- w:Section("Teleport to Race checkpoints")
- local b = w:Button("Highway Race", function()
- race(2, "highway_checkpoints", 0.3)
- Highway = game.workspace.race_checkpoints.highway_checkpoints.Checkpoint_1.Position
- tp(Highway.x, Highway.y, Highway.z, time)
- end)
- local b = w:Button("Airport Race", function()
- race(1, "airport_checkpoints", 0.3)
- end)
- local b = w:Button("Drag Strip Race", function()
- race(1, "quartermile_checkpoints", 0.3)
- end)
- local b = w:Button("Around The World Race", function()
- race(1, "aroundtheworld_checkpoints", 0.3)
- end)
- local b = w:Button("Shipping Yard Race", function()
- race(1, "shippingyard_checkpoints", 0.3)
- end)
- local b = w:Button("Dune Rally Race", function()
- race(1, "dunerally_checkpoints", 0.3)
- end)
- local b = w:Button("Race Track Race", function()
- race(1, "racetrack_checkpoints", 0.3)
- end)
- local b = w:Button("Sea Dash Race", function()
- race(1, "seadash_checkpoints", 0.3)
- end)
- w:Section("Other Cool Stuff")
- local b = w:Button("Auto Farm", function()
- --[[
- Fully automatic money/miles farm
- TODO:
- Add auto respawn vehicle
- ]]
- local waitTime = 1 --This will be the time it takes (seconds) until your car resets. See line 37
- --Do not change anything below :)
- local hint = Instance.new('Hint', Workspace) hint.Text = "Vehicle Simulator Autofarm loading..."
- local found = false
- local go = true
- function findVehicle() --Finds your vehicle
- while not found do --Loops until your vehicle has been found
- local vehicles = Workspace.Vehicles:getChildren()
- for i=1,#vehicles do
- if vehicles[i]:findFirstChild'owner' then
- if vehicles[i].owner.Value == game:GetService'Players'.LocalPlayer.Name then -- Found your vehicle
- found = true --Setting found to true so loop breaks
- vehicle = vehicles[i] -- Declares vehicle variable to your vehicle
- vehStats = vehicle.Handling -- Declares vehStats variable to vehicle stats folder
- vehStats.MaxSpeed.Value = 700
- vehStats.Torque.Value = 20000
- vehStats.SteeringRadiusConstant.Value = 120000000
- elseif vehicles[i + 1] == nil and not found then
- --Autorespawn would go here
- hint.Text = "Please spawn and enter your vehicle!" --Your vehicle does not exist in the Workspace
- end
- end
- end
- wait(1) --Waiting before checking again so we don't crash
- end
- wait(2) --We've found the car. Waiting so the car can be properly placed on the highway
- vehicle.PrimaryPart = vehicle.Chassis.VehicleSeat
- end
- function farm() --This is where the magic happens :)
- hint.Text = "Finished loading! Autofarm initialized."
- while wait(waitTime) do --Waits x seconds before resetting car
- vehicle:SetPrimaryPartCFrame(CFrame.new(-2470,60,777)) --Teleports vehicle to highway
- game:GetService'VirtualUser':SetKeyUp("w") --Resets W key
- game:GetService'VirtualUser':SetKeyDown("w") --Presses W key to go forward
- end
- end
- findVehicle() --Calls the findVehicle function
- while go do
- if not pcall(farm()) then --Calls farm function & checks for errors
- found = false --If it errors, it sets found to false and continues looking for your vehicle.
- findVehicle()
- end
- end
- end)
- local b = w:Button("Give All Perks", function()
- game:GetService("Players").LocalPlayer.UserId = 1099580
- end)
- local s = library:CreateWindow('Car Settings 🚗')
- local box = s:Box('MaxSpeed', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.MaxSpeed.Value = new
- end)
- local box = s:Box('Torque', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Torque.Value = new
- end)
- local box = s:Box('Spring Stiffness', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Suspension.Stiffness.Value = new
- end)
- local box = s:Box('Spring Damping', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Suspension.Damping.Value = new
- end)
- local box = s:Box('Rear Height', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Suspension.RearHeight.Value = new
- end)
- local box = s:Box('Front Height', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Suspension.FrontHeight.Value = new
- end)
- local box = s:Box('DownForce', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.DownForceMultiple.Value = new
- end)
- local box = s:Box('Friction OffRoad', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.FrictionOffRoad.Value = new
- end)
- local box = s:Box('Friction OnRoad', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.FrictionRoad.Value = new
- end)
- local box = s:Box('Car JumpPower', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.TurboJump.TurboJumpHeight.Value = new
- end)
- local box = s:Box('Air Rotation Power', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.AirRotation.Power.Value = new
- end)
- local box = s:Box('Car Mass', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Mass.Value = new
- end)
- local box = s:Box('Nitro Speed', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Nitro.NitroSpeed.Value = new
- end)
- local box = s:Box('Nitro Force', {
- flag = "tq";
- type = 'number';
- }, function(new)
- findcar().Handling.Nitro.NitroForce.Value = new
- end)
- local u = library:CreateWindow('Car Upgrades ⬆️')
- local t = u:Toggle('WeldedDiff', {flag = "WeldedDiff"})
- local t = u:Toggle('Turbo Jump', {flag = "TurboJump"})
- local t = u:Toggle('Air Rotation', {flag = "AirRotation"})
- local t = u:Toggle('Nitro', {flag = "Nitro"})
- local t = u:Toggle('Manual transmission', {flag = "Manualtransmission"})
- local t = u:Toggle('Unlimited Nitro', {flag = "UnlimitedNitro"})
- local b = u:Button("⬆️ Set Upgrades ⬆️", function()
- findcar().Handling.AirRotation.Value = u.flags.RearWheelDrive
- findcar().Handling.TurboJump.Value = u.flags.TurboJump
- findcar().Handling.Manual.Value = u.flags.Manualtransmission
- findcar().Handling.Nitro.Value = u.flags.Nitro
- findcar().Handling.WeldedDiff.Value = u.flags.WeldedDiff
- if u.flags.UnlimitedNitro == true then
- nitro = findcar().Handling
- while nitro ~= nil do
- wait(0.5)
- nitro.Nitro.NitroAmount.Value = 250
- end
- end
- end)
- local h = library:CreateWindow('Credit')
- h:Section("V3rmillion Links")
- local b = h:Button("Ui Maker Link 📋", function()
- setclipboard("v3rmillion.net/member.php?action=profile&uid=359615")
- end)
- local b = h:Button("Script Maker Link 📋", function()
- setclipboard("v3rmillion.net/member.php?action=profile&uid=759057")
- end)
- local b = h:Button("Idk who made the autofarm", function()
- end)
Add Comment
Please, Sign In to add comment