autofarm Highwayrace (OP)
Key Required

autofarm Highwayrace (OP)

Drift 36sdfwwsdfww 6.4K views 1.9K executesUpdated Jan 16, 2026
2.5/ 5(4 votes)
2250% Positive
Lua Script•195 lines (7447 chars)
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VIM = game:GetService("VirtualInputManager")
local player = Players.LocalPlayer

-- ==========================================
-- ACCOUNT CONFIGURATION
-- ==========================================
local MainAccountName = "lPOoHunger12l" 
local AltAccountName = "OrangeJuacfe"      

getgenv().AutoFarm = true
getgenv().AutoJoin = true

-- SPEED CONFIG (39ms Ping Optimized)
local TeleportDelay = 0.15 
local StartOffset = Vector3.new(0,0,0)

-- PARKING SPOTS (Red Circles Reset)
local ResetSpot = CFrame.new(0,0,0) 

if player.Name == MainAccountName then
    TeleportDelay = 0.15   
    StartOffset = Vector3.new(-12, 0, 0) 
    ResetSpot = CFrame.new(-45, 0, 25)  
elseif player.Name == AltAccountName then
    TeleportDelay = 0.60   
    StartOffset = Vector3.new(12, 0, 0)  
    ResetSpot = CFrame.new(45, 0, 25)    
end

local lastJoinAttempt = 0
-- ==========================================

local function getRoot()
    local char = player.Character
    return char and (char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso"))
end

local function triggerHandbrake()
    pcall(function()
        VIM:SendKeyEvent(true, Enum.KeyCode.Space, false, game)
        task.wait(0.5)
        VIM:SendKeyEvent(false, Enum.KeyCode.Space, false, game)
    end)
end

local function teleport(targetCFrame, isJoin, isReset)
    local char = player.Character
    if not char or not getRoot() then return end
    local humanoid = char:FindFirstChildOfClass("Humanoid")
    local target = getRoot()
    
    if humanoid and humanoid.SeatPart and humanoid.SeatPart:IsA("VehicleSeat") then
        target = humanoid.SeatPart:FindFirstAncestorWhichIsA("Model") or humanoid.SeatPart
    end
    
    pcall(function()
        local rootPart = target:IsA("Model") and target.PrimaryPart or target
        if rootPart then
            rootPart.AssemblyLinearVelocity = Vector3.new(0, -35, 0) 
            rootPart.AssemblyAngularVelocity = Vector3.new(0, 0, 0)
        end

        local finalCF
        if isJoin then
            finalCF = CFrame.new(targetCFrame.Position + StartOffset) * CFrame.Angles(0, targetCFrame.Rotation.Y, 0)
        elseif isReset then
            finalCF = targetCFrame * ResetSpot
        else
            -- Checkpoint teleport
            finalCF = CFrame.new(targetCFrame.Position + Vector3.new(0, 1.2, 0)) * CFrame.Angles(0, targetCFrame.Rotation.Y, 0)
        end

        if target:IsA("Model") then target:PivotTo(finalCF) else target.CFrame = finalCF end
        if isJoin or isReset then task.spawn(triggerHandbrake) end
    end)
end

local function getRaceStatus()
    local hPad = ReplicatedStorage.Modules.Race.Races.HighwayRace.WaitingZone
    local cPad = ReplicatedStorage.Modules.Race.Races.CityRace.WaitingZone
    
    local function check(pad)
        if not pad then return "None" end
        for _, child in ipairs(Workspace:GetDescendants()) do
            if child:IsA("TextLabel") then
                local t = child.Text:lower()
                if t:find("starting") or t:find("progress") then return "Busy" end
                if t:find("0/2") then return "0/2" end
                if t:find("1/2") then return "1/2" end
                if t:find("2/2") then return "2/2" end
            end
        end
        return "Empty"
    end
    return check(hPad), check(cPad)
end

local function runFarm()
    print("V29 Smart-Checkpoint Mode - " .. player.Name)
    
    while getgenv().AutoFarm do
        task.wait(0.05) 
        
        local trackFolder = nil
        local inCountdown = false
        for _, obj in ipairs(Workspace:GetChildren()) do
            if obj.Name:match("_TrackObjects$") then trackFolder = obj break end
            if obj.Name:match("_ClientObjects$") then inCountdown = true end
        end

        if trackFolder then
            -- [ IN RACE ]
            lastJoinAttempt = 0
            local checkpoints = trackFolder:FindFirstChild("Checkpoints")
            if checkpoints then
                local cpList = checkpoints:GetChildren()
                local totalCPs = #cpList
                local currentNumber = 1

                -- SMART LOOP: Continues until all checkpoints are confirmed GONE
                while currentNumber <= totalCPs and getgenv().AutoFarm and trackFolder:IsDescendantOf(Workspace) do
                    local targetCP = checkpoints:FindFirstChild(tostring(currentNumber))
                    
                    if targetCP then
                        teleport(targetCP.CFrame, false, false)
                        task.wait(TeleportDelay)
                        
                        -- Verification: If the checkpoint is still there after teleporting, 
                        -- the loop will repeat for the SAME number until it's gone.
                        if not checkpoints:FindFirstChild(tostring(currentNumber)) then
                            currentNumber = currentNumber + 1
                        end
                    else
                        -- If part is missing, it was likely already collected
                        currentNumber = currentNumber + 1
                    end
                    task.wait(0.01)
                end
                
                -- Teleport to Finish line
                local finish = trackFolder:FindFirstChild("FinishCollide")
                if finish and getgenv().AutoFarm then
                    if player.Name == AltAccountName then task.wait(1.8) end 
                    teleport(finish.CFrame, false, false)
                    task.wait(0.5)
                    repeat task.wait(0.1) until not trackFolder:IsDescendantOf(Workspace)
                end
            end
            
        elseif inCountdown then
            task.wait(0.2)
        elseif getgenv().AutoJoin then
            -- [ AUTO-JOIN / RESET LOGIC ]
            local hStatus, cStatus = getRaceStatus()
            local hPad = ReplicatedStorage.Modules.Race.Races.HighwayRace.WaitingZone
            local cPad = ReplicatedStorage.Modules.Race.Races.CityRace.WaitingZone
            
            local targetPad = nil
            if hStatus == "0/2" or hStatus == "1/2" or hStatus == "Empty" then
                targetPad = hPad
            elseif cStatus == "0/2" or cStatus == "1/2" or cStatus == "Empty" then
                targetPad = cPad
            end

            if targetPad then
                local root = getRoot()
                local dist = root and (root.Position - targetPad.Position).Magnitude or 999
                
                if dist > 20 then
                    teleport(targetPad.CFrame, true, false)
                    lastJoinAttempt = tick()
                elseif tick() - lastJoinAttempt > 5 then
                    -- Reset via Parking Spot
                    teleport(targetPad.CFrame, false, true)
                    task.wait(1.5)
                    teleport(targetPad.CFrame, true, false)
                    lastJoinAttempt = tick()
                end
            end
        end
    end
end

-- Keybind: P to stop
game:GetService("UserInputService").InputBegan:Connect(function(input, processed)
    if not processed and input.KeyCode == Enum.KeyCode.P then
        getgenv().AutoFarm = false
        print("STOPPED")
    end
end)

task.spawn(runFarm)

Features & Information

autofarm highway need 2 accs Im using private server

Community Comments (4)

Sitthisak1990Sitthisak1990Jan 16, 2026

0/10

davidrodrical2davidrodrical2Jan 22, 2026

why

Kas1akKas1akJan 25, 2026

works but buggy

pl1704002061plspl1704002061plsMay 13, 2026

хуйня фпс 5

More Scripts for Drift 36