Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Farewell Infortality.
- -- Version: 2.82
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Credit = Instance.new("TextLabel")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Main.Name = "Main"
- Main.Parent = ScreenGui
- Main.BackgroundColor3 = Color3.new(1, 1, 1)
- Main.Position = UDim2.new(0.636747599, 0, 0.19716087, 0)
- Main.Size = UDim2.new(0, 248, 0, 132)
- Main.Style = Enum.FrameStyle.DropShadow
- Main.Draggable = true
- Main.Active = true
- Credit.Name = "Credit"
- Credit.Parent = Main
- Credit.BackgroundColor3 = Color3.new(0, 0, 0)
- Credit.Position = UDim2.new(-0.0134156747, 0, -0.0650523826, 0)
- Credit.Size = UDim2.new(0, 237, 0, 41)
- Credit.Font = Enum.Font.SourceSans
- Credit.Text = "Credit: Devil Script"
- Credit.TextColor3 = Color3.new(1, 0, 0.0156863)
- Credit.TextSize = 30
- -- Scripts:
- --[[
- Fully automatic money/miles farm
- TODO:
- Add auto respawn vehicle
- ]]
- local waitTime = 3 --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 = 30000
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement