Загрузка данных


-- FlowClient alfa
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")
local CollectionService = game:GetService("CollectionService")
local VirtualInputManager = game:GetService("VirtualInputManager")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- Акцентный цвет
local AccentColor = Color3.fromRGB(0, 255, 150)
local AccentElements = {}

-- Состояния
local carAltSpeedEnabled = false
local borderGateEnabled = false
local carAntiCollisionEnabled = false
local antiAFKEnabled = false
local antiAFKTask = nil
local altHeld = false
local Values = { Speed = 200 }

-- ============================================
-- АНТИ-АФК
-- ============================================
local function startAntiAFK()
    if antiAFKEnabled then return end
    antiAFKEnabled = true
    antiAFKTask = task.spawn(function()
        while antiAFKEnabled do
            pcall(function()
                VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.I, false, game)
                task.wait(0.1)
                VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.I, false, game)
            end)
            pcall(function()
                local cam = workspace.CurrentCamera
                if cam then
                    cam.CFrame = cam.CFrame * CFrame.Angles(0, math.rad(5), 0)
                    task.wait(0.1)
                    cam.CFrame = cam.CFrame * CFrame.Angles(0, math.rad(-5), 0)
                end
            end)
            task.wait(60)
        end
    end)
end

local function stopAntiAFK()
    antiAFKEnabled = false
    if antiAFKTask then task.cancel(antiAFKTask) end
end

-- ============================================
-- INFINITY YIELD
-- ============================================
local infinityYieldLoaded = false

local function loadInfinityYield()
    if infinityYieldLoaded then return end
    infinityYieldLoaded = true
    pcall(function()
        loadstring(game:HttpGet("https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source"))()
        print("[FlowClient] Infinity Yield загружен!")
    end)
end

local function unloadInfinityYield()
    if not infinityYieldLoaded then return end
    infinityYieldLoaded = false
    pcall(function()
        if type(_G.InfiniteYield) == "function" then
            _G.InfiniteYield:Unload()
        end
    end)
    print("[FlowClient] Infinity Yield выгружен")
end

-- Car AltSpeed
local VehicleUtil
pcall(function()
    VehicleUtil = require(ReplicatedStorage:WaitForChild("SharedModules", 10):WaitForChild("VehicleUtil", 10))
end)

local vehicleAttrs = setmetatable({}, {__mode = "k"})

local function getDrivenVehicle()
    local character = player.Character
    local humanoid = character and character:FindFirstChildOfClass("Humanoid")
    local seat = humanoid and humanoid.SeatPart
    local vehicles = Workspace:FindFirstChild("Vehicles")
    if not seat or not vehicles then return nil, nil end
    local object = seat
    while object and object.Parent ~= vehicles do
        object = object.Parent
    end
    if not object or object.Parent ~= vehicles or not object:IsA("Model") then return nil, nil end
    local root = object:FindFirstChild("Root") or object.PrimaryPart or seat.AssemblyRootPart
    return object, root
end

local function resolveVehicle(humanoid)
    if VehicleUtil then
        local ok, vehicle = pcall(function()
            return VehicleUtil:GetHumanoidDrivenVehicle(humanoid)
        end)
        if ok and vehicle then return vehicle end
        local seat = humanoid.SeatPart
        if seat then
            local ok2, vehicle2 = pcall(function()
                return VehicleUtil:GetVehicleModelFromPart(seat)
            end)
            if ok2 and vehicle2 then return vehicle2 end
        end
    end
    local vehicle = getDrivenVehicle()
    return vehicle
end

local function boostVehicle(vehicle)
    if not vehicle or not vehicle.Parent then return false end
    local saved = vehicleAttrs[vehicle]
    if not saved then
        saved = {
            Top = vehicle:GetAttribute("TopSpeedMultiplier"),
            Power = vehicle:GetAttribute("EnginePowerMultiplier"),
        }
        vehicleAttrs[vehicle] = saved
    end
    local top = saved.Top
    if type(top) ~= "number" or top <= 0 or top ~= top then top = 1 end
    local power = saved.Power
    if type(power) ~= "number" or power <= 0 or power ~= power then power = 1 end
    local multiplier = math.clamp(Values.Speed / 100, 1, 4)
    pcall(function()
        vehicle:SetAttribute("TopSpeedMultiplier", top * multiplier)
        vehicle:SetAttribute("EnginePowerMultiplier", power * multiplier)
    end)
end

local function restoreVehicles()
    for vehicle, saved in pairs(vehicleAttrs) do
        if vehicle and vehicle.Parent then
            pcall(function()
                vehicle:SetAttribute("TopSpeedMultiplier", saved.Top)
                vehicle:SetAttribute("EnginePowerMultiplier", saved.Power)
            end)
        end
        vehicleAttrs[vehicle] = nil
    end
end

-- Border Gate Anti-Collision
local gateParts = {}

local function clearGateCollision()
    for part, originalCanCollide in pairs(gateParts) do
        if part and part.Parent then
            pcall(function()
                part.CanCollide = originalCanCollide
            end)
        end
    end
    table.clear(gateParts)
end

local function isBarrierPart(part)
    if not part:IsA("BasePart") then return false end
    local ok, group = pcall(function() return part.CollisionGroup end)
    if ok and group == "GateBarrier" then return true end
    return false
end

local function findBarrierParts()
    local parts = {}
    for _, gate in ipairs(CollectionService:GetTagged("Gate")) do
        if gate:IsDescendantOf(Workspace) then
            if isBarrierPart(gate) then table.insert(parts, gate) end
            for _, descendant in ipairs(gate:GetDescendants()) do
                if isBarrierPart(descendant) then table.insert(parts, descendant) end
            end
        end
    end
    if #parts == 0 then
        for _, object in ipairs(Workspace:GetDescendants()) do
            if isBarrierPart(object) then
                table.insert(parts, object)
            end
        end
    end
    return parts
end

local function enableGateCollision()
    clearGateCollision()
    local barriers = findBarrierParts()
    for _, part in ipairs(barriers) do
        gateParts[part] = part.CanCollide
        part.CanCollide = false
    end
    print("[FlowClient] Gate barriers disabled:", #barriers)
end

-- ============================================
-- CAR ANTI-COLLISION (ИЗ СТАРОГО КОДА)
-- ============================================
local antiCollisionConstraints = {}

local function clearAntiCollisionConstraints()
    for constraint in pairs(antiCollisionConstraints) do
        pcall(function()
            if constraint and constraint.Parent then constraint:Destroy() end
        end)
    end
    table.clear(antiCollisionConstraints)
end

local function getVehicleColliders(vehicle)
    local result = {}
    local body = vehicle and vehicle:FindFirstChild("Body")
    if not body then return result end
    local colliders = body:FindFirstChild("Colliders")
    if colliders then
        for _, part in ipairs(colliders:GetDescendants()) do
            if part:IsA("BasePart") then table.insert(result, part) end
        end
    end
    return result
end

local function reconcileAntiCollision()
    local vehicles = Workspace:FindFirstChild("Vehicles")
    local ownVehicle = getDrivenVehicle()
    if not vehicles or not ownVehicle then clearAntiCollisionConstraints(); return end
    
    local ownParts = getVehicleColliders(ownVehicle)
    if #ownParts == 0 then clearAntiCollisionConstraints(); return end
    
    local desired = {}
    for _, otherVehicle in ipairs(vehicles:GetChildren()) do
        if otherVehicle:IsA("Model") and otherVehicle ~= ownVehicle then
            local otherParts = getVehicleColliders(otherVehicle)
            for _, ownPart in ipairs(ownParts) do
                if ownPart.Parent then
                    local map = desired[ownPart] or {}
                    desired[ownPart] = map
                    for _, otherPart in ipairs(otherParts) do
                        if otherPart.Parent then map[otherPart] = true end
                    end
                end
            end
        end
    end
    
    for constraint in pairs(antiCollisionConstraints) do
        local part0, part1 = constraint.Part0, constraint.Part1
        local map = part0 and desired[part0]
        if not map or not map[part1] then
            pcall(function() constraint:Destroy() end)
            antiCollisionConstraints[constraint] = nil
        else
            map[part1] = nil
        end
    end
    
    for ownPart, map in pairs(desired) do
        for otherPart in pairs(map) do
            local constraint = Instance.new("NoCollisionConstraint")
            constraint.Part0 = ownPart
            constraint.Part1 = otherPart
            constraint.Parent = ownPart
            antiCollisionConstraints[constraint] = true
        end
    end
end

-- Heartbeat
local gateTimer = 0
local antiCollisionTimer = 0
local boostTimer = 0
local gateRescanTimer = 0

RunService.Heartbeat:Connect(function(deltaTime)
    if carAltSpeedEnabled and altHeld then
        boostTimer = boostTimer + deltaTime
        if boostTimer >= 0.1 then
            boostTimer = 0
            local character = player.Character
            local humanoid = character and character:FindFirstChildOfClass("Humanoid")
            if humanoid and humanoid.SeatPart then
                local vehicle = resolveVehicle(humanoid)
                if vehicle then boostVehicle(vehicle) end
            end
        end
    end
    
    if borderGateEnabled then
        gateRescanTimer = gateRescanTimer + deltaTime
        if gateRescanTimer >= 2 then
            gateRescanTimer = 0
            pcall(enableGateCollision)
        end
    end
    
    if carAntiCollisionEnabled then
        antiCollisionTimer = antiCollisionTimer + deltaTime
        if antiCollisionTimer >= 0.3 then
            antiCollisionTimer = 0
            pcall(reconcileAntiCollision)
        end
    end
end)

UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftAlt or input.KeyCode == Enum.KeyCode.RightAlt then
        if not UserInputService:GetFocusedTextBox() then
            altHeld = true
        end
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftAlt or input.KeyCode == Enum.KeyCode.RightAlt then
        altHeld = UserInputService:IsKeyDown(Enum.KeyCode.LeftAlt) or UserInputService:IsKeyDown(Enum.KeyCode.RightAlt)
        if not altHeld then
            restoreVehicles()
        end
    end
end)

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FlowClient"
screenGui.Parent = playerGui
screenGui.ResetOnSpawn = false

local MainFrame = Instance.new("Frame")
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
MainFrame.BorderSizePixel = 0
MainFrame.Position = UDim2.new(0.5, -250, 0.5, -300)
MainFrame.Size = UDim2.new(0, 500, 0, 600)
MainFrame.Visible = false
MainFrame.Parent = screenGui

local MainCorner = Instance.new("UICorner")
MainCorner.CornerRadius = UDim.new(0, 10)
MainCorner.Parent = MainFrame

local TitleBar = Instance.new("Frame")
TitleBar.BackgroundColor3 = Color3.fromRGB(35, 35, 40)
TitleBar.BorderSizePixel = 0
TitleBar.Size = UDim2.new(1, 0, 0, 35)
TitleBar.Parent = MainFrame

local TitleCorner = Instance.new("UICorner")
TitleCorner.CornerRadius = UDim.new(0, 10)
TitleCorner.Parent = TitleBar

local TitleText = Instance.new("TextLabel")
TitleText.BackgroundTransparency = 1
TitleText.Size = UDim2.new(1, 0, 1, 0)
TitleText.Font = Enum.Font.GothamBold
TitleText.TextColor3 = Color3.fromRGB(255, 255, 255)
TitleText.TextSize = 16
TitleText.Text = "FlowClient alfa"
TitleText.Parent = TitleBar

local CloseButton = Instance.new("TextButton")
CloseButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
CloseButton.BorderSizePixel = 0
CloseButton.Position = UDim2.new(1, -30, 0, 7)
CloseButton.Size = UDim2.new(0, 20, 0, 20)
CloseButton.Text = "X"
CloseButton.Font = Enum.Font.GothamBold
CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
CloseButton.TextSize = 12
CloseButton.AutoButtonColor = false
CloseButton.Parent = TitleBar

local CloseCorner = Instance.new("UICorner")
CloseCorner.CornerRadius = UDim.new(0, 5)
CloseCorner.Parent = CloseButton

CloseButton.MouseButton1Click:Connect(function()
    MainFrame.Visible = false
end)

-- Tabs
local TabButtons = {}
local TabPages = {}

local function CreateTab(name, pos)
    local TabButton = Instance.new("TextButton")
    TabButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
    TabButton.BorderSizePixel = 0
    TabButton.Position = UDim2.new(0, pos, 0, 45)
    TabButton.Size = UDim2.new(0, 100, 0, 30)
    TabButton.Text = name
    TabButton.Font = Enum.Font.GothamMedium
    TabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
    TabButton.TextSize = 14
    TabButton.AutoButtonColor = false
    TabButton.Parent = MainFrame
    
    local TabCorner = Instance.new("UICorner")
    TabCorner.CornerRadius = UDim.new(0, 5)
    TabCorner.Parent = TabButton
    
    local TabPage = Instance.new("ScrollingFrame")
    TabPage.BackgroundTransparency = 1
    TabPage.BorderSizePixel = 0
    TabPage.Position = UDim2.new(0, 10, 0, 85)
    TabPage.Size = UDim2.new(1, -20, 1, -95)
    TabPage.Visible = false
    TabPage.ScrollBarThickness = 5
    TabPage.CanvasSize = UDim2.new(0, 0, 0, 500)
    TabPage.ScrollingDirection = Enum.ScrollingDirection.Y
    TabPage.AutomaticCanvasSize = Enum.AutomaticSize.Y
    TabPage.Parent = MainFrame
    
    local List = Instance.new("UIListLayout")
    List.SortOrder = Enum.SortOrder.LayoutOrder
    List.Padding = UDim.new(0, 10)
    List.Parent = TabPage
    
    TabButton.MouseButton1Click:Connect(function()
        for _, page in pairs(TabPages) do
            page.Visible = false
        end
        TabPage.Visible = true
        for _, btn in pairs(TabButtons) do
            btn.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
            btn.TextColor3 = Color3.fromRGB(200, 200, 200)
        end
        TabButton.BackgroundColor3 = AccentColor
        TabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    end)
    
    table.insert(TabButtons, TabButton)
    table.insert(TabPages, TabPage)
    return TabPage
end

local function CreateElement(parent, height)
    local Frame = Instance.new("Frame")
    Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
    Frame.BorderSizePixel = 0
    Frame.Size = UDim2.new(1, 0, 0, height or 60)
    Frame.Parent = parent
    
    local Corner = Instance.new("UICorner")
    Corner.CornerRadius = UDim.new(0, 8)
    Corner.Parent = Frame
    
    return Frame
end

local function AddSlider(parent, text, min, max, default, callback)
    local Frame = CreateElement(parent)
    
    local Label = Instance.new("TextLabel")
    Label.BackgroundTransparency = 1
    Label.Position = UDim2.new(0, 15, 0, 0)
    Label.Size = UDim2.new(0.35, 0, 1, 0)
    Label.Font = Enum.Font.GothamMedium
    Label.TextColor3 = Color3.fromRGB(255, 255, 255)
    Label.TextSize = 14
    Label.Text = text
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = Frame
    
    local ValueInput = Instance.new("TextBox")
    ValueInput.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
    ValueInput.BorderSizePixel = 0
    ValueInput.Position = UDim2.new(0.4, 0, 0.5, -15)
    ValueInput.Size = UDim2.new(0.12, 0, 0, 30)
    ValueInput.Font = Enum.Font.GothamMedium
    ValueInput.TextColor3 = AccentColor
    ValueInput.TextSize = 14
    ValueInput.Text = tostring(default)
    ValueInput.Parent = Frame
    table.insert(AccentElements, {element = ValueInput, type = "TextColor"})
    
    local ValueCorner = Instance.new("UICorner")
    ValueCorner.CornerRadius = UDim.new(0, 6)
    ValueCorner.Parent = ValueInput
    
    local SliderBar = Instance.new("Frame")
    SliderBar.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
    SliderBar.BorderSizePixel = 0
    SliderBar.Position = UDim2.new(0.55, 0, 0.5, -12)
    SliderBar.Size = UDim2.new(0.4, -20, 0, 24)
    SliderBar.Parent = Frame
    
    local SliderCorner = Instance.new("UICorner")
    SliderCorner.CornerRadius = UDim.new(0, 12)
    SliderCorner.Parent = SliderBar
    
    local Fill = Instance.new("Frame")
    Fill.BackgroundColor3 = AccentColor
    Fill.BorderSizePixel = 0
    Fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
    Fill.Parent = SliderBar
    table.insert(AccentElements, {element = Fill, type = "Background"})
    
    local FillCorner = Instance.new("UICorner")
    FillCorner.CornerRadius = UDim.new(0, 12)
    FillCorner.Parent = Fill
    
    local Knob = Instance.new("TextButton")
    Knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    Knob.BorderSizePixel = 0
    Knob.Position = UDim2.new((default - min) / (max - min), -14, 0.5, -14)
    Knob.Size = UDim2.new(0, 28, 0, 28)
    Knob.Text = ""
    Knob.AutoButtonColor = false
    Knob.Parent = SliderBar
    
    local KnobCorner = Instance.new("UICorner")
    KnobCorner.CornerRadius = UDim.new(0, 14)
    KnobCorner.Parent = Knob
    
    local dragging = false
    local currentValue = default
    
    local function SetValue(val)
        val = math.clamp(val, min, max)
        currentValue = val
        local rel = (val - min) / (max - min)
        Fill.Size = UDim2.new(rel, 0, 1, 0)
        Knob.Position = UDim2.new(rel, -14, 0.5, -14)
        ValueInput.Text = tostring(val)
        if callback then callback(val) end
    end
    
    local function Update(input)
        local rel = math.clamp((input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1)
        SetValue(math.floor(min + (max - min) * rel))
    end
    
    SliderBar.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            Update(input)
        end
    end)
    
    Knob.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            Update(input)
        end
    end)
    
    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = false
        end
    end)
    
    UserInputService.InputChanged:Connect(function(input)
        if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            Update(input)
        end
    end)
    
    ValueInput.FocusLost:Connect(function()
        local num = tonumber(ValueInput.Text)
        if num then
            SetValue(num)
        else
            ValueInput.Text = tostring(currentValue)
        end
    end)
end

local function AddToggle(parent, text, default, callback)
    local Frame = CreateElement(parent)
    
    local Label = Instance.new("TextLabel")
    Label.BackgroundTransparency = 1
    Label.Position = UDim2.new(0, 15, 0, 0)
    Label.Size = UDim2.new(0.5, 0, 1, 0)
    Label.Font = Enum.Font.GothamMedium
    Label.TextColor3 = Color3.fromRGB(255, 255, 255)
    Label.TextSize = 14
    Label.Text = text
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = Frame
    
    local Switch = Instance.new("TextButton")
    Switch.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
    Switch.BorderSizePixel = 0
    Switch.Position = UDim2.new(1, -60, 0.5, -15)
    Switch.Size = UDim2.new(0, 50, 0, 30)
    Switch.Text = ""
    Switch.AutoButtonColor = false
    Switch.Parent = Frame
    table.insert(AccentElements, {element = Switch, type = "BackgroundConditional", defaultColor = Color3.fromRGB(60, 60, 65)})
    
    local SwitchCorner = Instance.new("UICorner")
    SwitchCorner.CornerRadius = UDim.new(0, 15)
    SwitchCorner.Parent = Switch
    
    local Knob = Instance.new("Frame")
    Knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    Knob.BorderSizePixel = 0
    Knob.Position = UDim2.new(0, 3, 0.5, -12)
    Knob.Size = UDim2.new(0, 24, 0, 24)
    Knob.Parent = Switch
    
    local KnobCorner = Instance.new("UICorner")
    KnobCorner.CornerRadius = UDim.new(0, 12)
    KnobCorner.Parent = Knob
    
    local toggled = default or false
    
    local function UpdateToggle()
        if toggled then
            Switch.BackgroundColor3 = AccentColor
            Knob.Position = UDim2.new(1, -27, 0.5, -12)
        else
            Switch.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
            Knob.Position = UDim2.new(0, 3, 0.5, -12)
        end
    end
    
    Switch.MouseButton1Click:Connect(function()
        toggled = not toggled
        if toggled then
            Switch.BackgroundColor3 = AccentColor
            TweenService:Create(Knob, TweenInfo.new(0.2), {Position = UDim2.new(1, -27, 0.5, -12)}):Play()
        else
            Switch.BackgroundColor3 = Color3.fromRGB(60, 60, 65)
            TweenService:Create(Knob, TweenInfo.new(0.2), {Position = UDim2.new(0, 3, 0.5, -12)}):Play()
        end
        if callback then callback(toggled) end
    end)
    
    UpdateToggle()
end

local function AddRadioGroup(parent, title, options)
    local Frame = CreateElement(parent, 60 + #options * 40)
    
    local Label = Instance.new("TextLabel")
    Label.BackgroundTransparency = 1
    Label.Position = UDim2.new(0, 15, 0, 10)
    Label.Size = UDim2.new(1, -30, 0, 30)
    Label.Font = Enum.Font.GothamBold
    Label.TextColor3 = Color3.fromRGB(255, 255, 255)
    Label.TextSize = 14
    Label.Text = title
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = Frame
    
    local OptionButtons = {}
    
    for i, option in ipairs(options) do
        local OptionButton = Instance.new("TextButton")
        OptionButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
        OptionButton.BorderSizePixel = 0
        OptionButton.Position = UDim2.new(0, 10, 0, 45 + (i - 1) * 40)
        OptionButton.Size = UDim2.new(1, -20, 0, 35)
        OptionButton.Text = option
        OptionButton.Font = Enum.Font.GothamMedium
        OptionButton.TextColor3 = Color3.fromRGB(200, 200, 200)
        OptionButton.TextSize = 14
        OptionButton.AutoButtonColor = false
        OptionButton.Parent = Frame
        
        local Corner = Instance.new("UICorner")
        Corner.CornerRadius = UDim.new(0, 8)
        Corner.Parent = OptionButton
        
        OptionButton.MouseButton1Click:Connect(function()
            for _, btn in ipairs(OptionButtons) do
                btn.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
                btn.TextColor3 = Color3.fromRGB(200, 200, 200)
            end
            OptionButton.BackgroundColor3 = AccentColor
            OptionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        end)
        
        table.insert(OptionButtons, OptionButton)
    end
    
    if OptionButtons[1] then
        OptionButtons[1].BackgroundColor3 = AccentColor
        OptionButtons[1].TextColor3 = Color3.fromRGB(255, 255, 255)
        table.insert(AccentElements, {element = OptionButtons[1], type = "BackgroundConditional", defaultColor = Color3.fromRGB(50, 50, 55)})
    end
end

local function AddButton(parent, text, callback)
    local Frame = CreateElement(parent)
    
    local Button = Instance.new("TextButton")
    Button.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
    Button.BorderSizePixel = 0
    Button.Position = UDim2.new(0, 10, 0, 10)
    Button.Size = UDim2.new(1, -20, 0, 40)
    Button.Text = text
    Button.Font = Enum.Font.GothamMedium
    Button.TextColor3 = Color3.fromRGB(255, 255, 255)
    Button.TextSize = 14
    Button.AutoButtonColor = false
    Button.Parent = Frame
    
    local Corner = Instance.new("UICorner")
    Corner.CornerRadius = UDim.new(0, 8)
    Corner.Parent = Button
    
    Button.MouseButton1Down:Connect(function()
        TweenService:Create(Button, TweenInfo.new(0.1), {
            Size = UDim2.new(0.95, -20, 0, 38),
            BackgroundColor3 = AccentColor
        }):Play()
    end)
    
    Button.MouseButton1Up:Connect(function()
        TweenService:Create(Button, TweenInfo.new(0.1), {
            Size = UDim2.new(1, -20, 0, 40),
            BackgroundColor3 = Color3.fromRGB(50, 50, 55)
        }):Play()
    end)
    
    Button.MouseButton1Click:Connect(callback or function() end)
end

local function AddColorPicker(parent, title)
    local Frame = CreateElement(parent, 150)
    
    local Label = Instance.new("TextLabel")
    Label.BackgroundTransparency = 1
    Label.Position = UDim2.new(0, 15, 0, 10)
    Label.Size = UDim2.new(1, -30, 0, 30)
    Label.Font = Enum.Font.GothamBold
    Label.TextColor3 = Color3.fromRGB(255, 255, 255)
    Label.TextSize = 14
    Label.Text = title
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = Frame
    
    local Colors = {
        Color3.fromRGB(0, 255, 150),
        Color3.fromRGB(0, 150, 255),
        Color3.fromRGB(255, 100, 255),
        Color3.fromRGB(255, 200, 0),
        Color3.fromRGB(255, 100, 100),
        Color3.fromRGB(150, 100, 255),
        Color3.fromRGB(255, 150, 0),
    }
    
    for i, color in ipairs(Colors) do
        local ColorButton = Instance.new("TextButton")
        ColorButton.BackgroundColor3 = color
        ColorButton.BorderSizePixel = 0
        ColorButton.Position = UDim2.new(0, 10 + ((i - 1) % 4) * 115, 0, 50 + math.floor((i - 1) / 4) * 45)
        ColorButton.Size = UDim2.new(0, 105, 0, 35)
        ColorButton.Text = ""
        ColorButton.AutoButtonColor = false
        ColorButton.Parent = Frame
        
        local Corner = Instance.new("UICorner")
        Corner.CornerRadius = UDim.new(0, 8)
        Corner.Parent = ColorButton
        
        ColorButton.MouseButton1Click:Connect(function()
            AccentColor = color
            for _, item in pairs(AccentElements) do
                local elem = item.element
                local elemType = item.type
                
                if elemType == "TextColor" then
                    elem.TextColor3 = AccentColor
                elseif elemType == "Background" then
                    elem.BackgroundColor3 = AccentColor
                elseif elemType == "BackgroundConditional" then
                    if elem.BackgroundColor3 ~= item.defaultColor then
                        elem.BackgroundColor3 = AccentColor
                    end
                end
            end
            for _, btn in pairs(TabButtons) do
                if btn.BackgroundColor3 ~= Color3.fromRGB(50, 50, 55) then
                    btn.BackgroundColor3 = AccentColor
                end
            end
        end)
    end
end

-- Создание вкладок
local AutofarmTab = CreateTab("Autofarm", 10)
local VisualsTab = CreateTab("Visuals", 115)
local MiscTab = CreateTab("Misc", 220)
local SettingsTab = CreateTab("Settings", 325)

AutofarmTab.Visible = true
TabButtons[1].BackgroundColor3 = AccentColor
TabButtons[1].TextColor3 = Color3.fromRGB(255, 255, 255)
table.insert(AccentElements, {element = TabButtons[1], type = "BackgroundConditional", defaultColor = Color3.fromRGB(50, 50, 55)})

-- Autofarm Tab
AddToggle(AutofarmTab, "Autofarm")
AddRadioGroup(AutofarmTab, "Item", {"Ring", "Mona Lisa"})
AddRadioGroup(AutofarmTab, "Type", {"Player", "Car"})
AddSlider(AutofarmTab, "Speed", 50, 300, 50)
AddToggle(AutofarmTab, "Boat Autofarm")
AddRadioGroup(AutofarmTab, "Boat", {"Dinghy", "Fishing Boat", "Go-fast"})

-- Visuals Tab
AddToggle(VisualsTab, "ESP")
AddToggle(VisualsTab, "Low Graphics")

-- Misc Tab
AddToggle(MiscTab, "Car AltSpeed", false, function(state)
    carAltSpeedEnabled = state
    if not state then restoreVehicles() end
end)
AddSlider(MiscTab, "Speed", 0, 400, 200, function(value)
    Values.Speed = value
end)
AddToggle(MiscTab, "Border Gate Anti-Collision", false, function(state)
    borderGateEnabled = state
    if state then
        enableGateCollision()
    else
        clearGateCollision()
    end
end)
AddToggle(MiscTab, "Car Anti-Collision", false, function(state)
    carAntiCollisionEnabled = state
    if not state then clearAntiCollisionConstraints() end
end)
AddToggle(MiscTab, "Anti-AFK", false, function(state)
    if state then
        startAntiAFK()
    else
        stopAntiAFK()
    end
end)
AddToggle(MiscTab, "Infinity Yield", false, function(state)
    if state then
        loadInfinityYield()
    else
        unloadInfinityYield()
    end
end)

-- Settings Tab
AddColorPicker(SettingsTab, "Accent Color")
AddButton(SettingsTab, "Unload Script", function()
    stopAntiAFK()
    unloadInfinityYield()
    restoreVehicles()
    clearGateCollision()
    clearAntiCollisionConstraints()
    screenGui:Destroy()
    print("FlowClient unloaded!")
end)

-- Подсказка
local HintLabel = Instance.new("TextLabel")
HintLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
HintLabel.BackgroundTransparency = 0.5
HintLabel.BorderSizePixel = 0
HintLabel.Position = UDim2.new(1, -210, 1, -40)
HintLabel.Size = UDim2.new(0, 200, 0, 30)
HintLabel.Font = Enum.Font.GothamBold
HintLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
HintLabel.TextSize = 14
HintLabel.Text = "Press Right Shift to open menu"
HintLabel.TextXAlignment = Enum.TextXAlignment.Center
HintLabel.Parent = screenGui

local HintCorner = Instance.new("UICorner")
HintCorner.CornerRadius = UDim.new(0, 8)
HintCorner.Parent = HintLabel

-- Right Shift
UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.RightShift then
        MainFrame.Visible = not MainFrame.Visible
    end
end)

-- Drag
local dragging = false
local dragStart = nil
local windowStart = nil

TitleBar.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        windowStart = MainFrame.Position
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = false
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = input.Position - dragStart
        MainFrame.Position = UDim2.new(windowStart.X.Scale, windowStart.X.Offset + delta.X, windowStart.Y.Scale, windowStart.Y.Offset + delta.Y)
    end
end)

print("FlowClient alfa loaded!")

сверху ты видишь мой клиент. твоя задача - исправить border gate anti-collision и car anti-collision. бери из кода ниже.

local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
if _G.CarunoHubUI and type(_G.CarunoHubUI.Destroy) == "function" then
	pcall(_G.CarunoHubUI.Destroy)
end
local oldGui = playerGui:FindFirstChild("CarunoHubUI")
if oldGui then
	oldGui:Destroy()
end
local COLORS = {
	Void        = Color3.fromRGB(2, 2, 3),
	Background  = Color3.fromRGB(6, 6, 7),
	Panel       = Color3.fromRGB(11, 11, 12),
	PanelLight  = Color3.fromRGB(16, 16, 18),
	PanelHover  = Color3.fromRGB(23, 23, 26),
	PanelActive = Color3.fromRGB(30, 30, 34),
	Stroke      = Color3.fromRGB(52, 52, 58),
	StrokeSoft  = Color3.fromRGB(29, 29, 33),
	Text        = Color3.fromRGB(247, 247, 249),
	Subtle      = Color3.fromRGB(170, 170, 178),
	Muted       = Color3.fromRGB(116, 116, 124),
	Faint       = Color3.fromRGB(72, 72, 80),
	Accent      = Color3.fromRGB(247, 247, 249),
	AccentDark  = Color3.fromRGB(148, 148, 156),
	Black       = Color3.fromRGB(4, 4, 5),
	Green       = Color3.fromRGB(88, 214, 134),
	Amber       = Color3.fromRGB(228, 178, 84),
	Red         = Color3.fromRGB(228, 88, 88),
}
local TWEEN_FAST   = TweenInfo.new(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local TWEEN_NORMAL = TweenInfo.new(0.22, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)
local TWEEN_SLOW   = TweenInfo.new(0.40, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
local TWEEN_POP    = TweenInfo.new(0.28, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
local connections = {}
local pages = {}
local navButtons = {}
local listeners = {}
local values = {
	altSpeed = 60,
	vehicleAltSpeed = 200,
	vehicleAltRisky = false,
	language = (type(_G.CarunoHubLanguage) == "string" and _G.CarunoHubLanguage) or "English",
}
local currentLanguage = values.language
local TEXT = {
	["Scripts"] = { Russian = "Скрипты", Spanish = "Scripts" },
	["Physics Ram"] = { Russian = "Физический таран", Spanish = "Ariete físico" },
	["Vehicle"] = { Russian = "Транспорт", Spanish = "Vehículo" },
	["Player"] = { Russian = "Персонаж", Spanish = "Jugador" },
	["Combat"] = { Russian = "Оружие", Spanish = "Combate" },
	["Robbery"] = { Russian = "Ограбления", Spanish = "Robos" },
	["Vehicle Anti-Collision"] = {
		Russian = "Антиколлизия транспорта",
		Spanish = "Anticolisión de vehículos",
	},
	["Remove Border Speed Limit"] = {
		Russian = "Без лимита на таможне",
		Spanish = "Sin límite en la frontera",
	},
	["Infinite Fuel"] = { Russian = "Бесконечное топливо", Spanish = "Combustible infinito" },
	["Anti PIT"] = { Russian = "Защита от подрезания", Spanish = "Anti PIT" },
	["Alt Speed"] = { Russian = "Скорость на Alt", Spanish = "Velocidad con Alt" },
	["Vehicle Speed on Alt"] = {
		Russian = "Скорость транспорта на Alt",
		Spanish = "Velocidad del vehículo con Alt",
	},
	["Vehicle Alt Speed"] = {
		Russian = "Скорость транспорта на Alt",
		Spanish = "Velocidad del vehículo con Alt",
	},
	["Infinite Stamina"] = { Russian = "Бесконечная стамина", Spanish = "Resistencia infinita" },
	["No Recoil"] = { Russian = "Без отдачи", Spanish = "Sin retroceso" },
	["Auto Farm"] = { Russian = "Автофарм", Spanish = "Auto farm" },
	["Start"] = { Russian = "Запустить", Spanish = "Iniciar" },
	["Stop"] = { Russian = "Остановить", Spanish = "Detener" },
	["Run once"] = { Russian = "Запустить один раз", Spanish = "Ejecutar una vez" },
	["Confirm"] = { Russian = "Подтвердить", Spanish = "Confirmar" },
	["Executed"] = { Russian = "Запущено", Spanish = "Ejecutado" },
	["Failed"] = { Russian = "Ошибка", Spanish = "Error" },
	["Executor required"] = { Russian = "Нужен executor", Spanish = "Requiere executor" },
	["Settings"] = { Russian = "Настройки", Spanish = "Ajustes" },
	["Language"] = { Russian = "Язык", Spanish = "Idioma" },
	["Background"] = { Russian = "Фон", Spanish = "Fondo" },
	["Compact mode"] = { Russian = "Компактный режим", Spanish = "Modo compacto" },
	["Unload interface"] = { Russian = "Выгрузить интерфейс", Spanish = "Cerrar interfaz" },
	["Unload"] = { Russian = "Выгрузить", Spanish = "Cerrar" },
}
local function translate(key)
	local entry = TEXT[key]
	if not entry or currentLanguage == "English" then
		return key
	end
	return entry[currentLanguage] or key
end
local function connect(signal, callback)
	local connection = signal:Connect(callback)
	table.insert(connections, connection)
	return connection
end
local function tween(instance, properties, tweenInfo)
	local animation = TweenService:Create(instance, tweenInfo or TWEEN_FAST, properties)
	animation:Play()
	return animation
end
local function create(className, properties, children)
	local instance = Instance.new(className)
	for property, value in pairs(properties or {}) do
		instance[property] = value
	end
	for _, child in ipairs(children or {}) do
		child.Parent = instance
	end
	return instance
end
local function corner(radius)
	return create("UICorner", {
		CornerRadius = UDim.new(0, radius),
	})
end
local function stroke(color, thickness, transparency)
	return create("UIStroke", {
		Color = color or COLORS.Stroke,
		Thickness = thickness or 1,
		Transparency = transparency or 0,
		ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
	})
end
local function padding(left, right, top, bottom)
	return create("UIPadding", {
		PaddingLeft = UDim.new(0, left or 0),
		PaddingRight = UDim.new(0, right or 0),
		PaddingTop = UDim.new(0, top or 0),
		PaddingBottom = UDim.new(0, bottom or 0),
	})
end
local UI = {}
function UI.gradient(rotation, colorSequence, transparencySequence)
	local instance = create("UIGradient", { Rotation = rotation or 0 })
	if colorSequence then
		instance.Color = colorSequence
	end
	if transparencySequence then
		instance.Transparency = transparencySequence
	end
	return instance
end
function UI.dot(parent, diameter, color)
	return create("Frame", {
		Name = "Dot",
		Size = UDim2.fromOffset(diameter, diameter),
		BackgroundColor3 = color,
		BorderSizePixel = 0,
		Parent = parent,
	}, {
		corner(math.ceil(diameter / 2)),
	})
end
function UI.label(parent, props)
	props.BackgroundTransparency = 1
	props.Parent = parent
	return create("TextLabel", props)
end
function UI.hover(button, enter, leave)
	connect(button.MouseEnter, enter)
	connect(button.MouseLeave, leave)
end
local function emit(name, value)
	values[name] = value
	if listeners[name] then
		for _, callback in ipairs(listeners[name]) do
			task.spawn(callback, value)
		end
	end
end
local VehicleUtil
do
	local ok, module = pcall(function()
		return require(
			ReplicatedStorage
				:WaitForChild("SharedModules", 10)
				:WaitForChild("VehicleUtil", 10)
		)
	end)
	if ok and type(module) == "table" then
		VehicleUtil = module
	end
end
local speedSaved = setmetatable({}, { __mode = "k" })
local altHeld = false
local STUDS_PER_MPH = 1.6
local vehicleSpeedWarned = false
local function warnVehicleSpeedOnce()
	if vehicleSpeedWarned then
		return
	end
	vehicleSpeedWarned = true
	warn("[CARUNOHUB] Vehicle Speed: vehicle model not resolved (VehicleUtil / Workspace.Vehicles)")
end
local RAM_SOURCE = [==[local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local Player = Players.LocalPlayer
local Vehicles = Workspace:WaitForChild("Vehicles")
local VehicleUtil = require(ReplicatedStorage.SharedModules.VehicleUtil)
local RequestPitRemote = ReplicatedStorage
	:WaitForChild("__remotes")
	:WaitForChild("VehicleService")
	:WaitForChild("RequestPitManeuver")
local env = (getgenv and getgenv()) or _G
local ACTION_NAME = "__VehiclePhysRamV9"
for _, name in ipairs({
	"VehicleLaunchCleanup", "VehicleRamV7Cleanup",
	"VehiclePhysRamCleanup", "VehicleRamHammerCleanup",
	"VehiclePitRamCleanup"
}) do
	if type(env[name]) == "function" then
		pcall(env[name])
	end
end
local CONFIG = {
	MaxTargetDistance = 150,
	RamSpeed = 2000,
	MassMultiplier = 100000,
	SpinSpeed = 55,
	RepositionDistance = 16,
	RearGap = 2,
	PitInterval = 1.05,
	SimulationRadius = 5000,
	ReturnLift = 3.5,
	LiftFrames = 10,
	ExactFrames = 60,
	SettleFrames = 12,
}
local running = true
local attacking = false
local restoring = false
local ownVehicle, ownRoot
local targetVehicle, targetRoot
local savedState
local savedRootProps
local attackConnection
local pitTimer = 0
local attackSide = 1
local didInitialPlace = false
local function boostSimulation()
	pcall(function()
		if type(setsimulationradius) == "function" then
			setsimulationradius(CONFIG.SimulationRadius, CONFIG.SimulationRadius)
		elseif type(sethiddenproperty) == "function" then
			sethiddenproperty(Player, "SimulationRadius", CONFIG.SimulationRadius)
			sethiddenproperty(Player, "MaximumSimulationRadius", CONFIG.SimulationRadius)
		end
	end)
end
local function getDrivenVehicle()
	local character = Player.Character
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	if not humanoid then
		return nil, nil
	end
	local vehicle = VehicleUtil:GetHumanoidDrivenVehicle(humanoid)
	if not vehicle then
		return nil, nil
	end
	return vehicle, VehicleUtil:GetVehicleRoot(vehicle)
end
local function findNearestVehicle(sourceVehicle, sourceRoot)
	local bestVehicle, bestRoot
	local bestDistance = CONFIG.MaxTargetDistance
	for _, vehicle in ipairs(Vehicles:GetChildren()) do
		if vehicle:IsA("Model") and vehicle ~= sourceVehicle then
			local root = VehicleUtil:GetVehicleRoot(vehicle)
			if root then
				local distance = (root.Position - sourceRoot.Position).Magnitude
				if distance < bestDistance then
					bestDistance = distance
					bestVehicle = vehicle
					bestRoot = root
				end
			end
		end
	end
	return bestVehicle, bestRoot
end
local function isTargetOccupied(vehicle)
	local occupants = VehicleUtil:GetOccupantCharactersOfVehicle(vehicle)
	if type(occupants) == "table" then
		return next(occupants) ~= nil
	end
	return occupants ~= nil
end
local function createSavedState(vehicle, root)
	local pivot = vehicle:GetPivot()
	local state = { Vehicle = vehicle, Root = root, Pivot = pivot, Parts = {} }
	for _, object in ipairs(vehicle:GetDescendants()) do
		if object:IsA("BasePart") then
			state.Parts[object] = {
				LocalCFrame = pivot:ToObjectSpace(object.CFrame),
				CanCollide = object.CanCollide,
				CanTouch = object.CanTouch,
				CanQuery = object.CanQuery,
				Massless = object.Massless,
				CustomPhysicalProperties = object.CustomPhysicalProperties,
			}
		end
	end
	return state
end
local function zeroPart(part)
	part.AssemblyLinearVelocity = Vector3.zero
	part.AssemblyAngularVelocity = Vector3.zero
end
local function setCollision(state, enabled)
	for part, properties in pairs(state.Parts) do
		if part and part.Parent then
			pcall(function()
				if enabled then
					part.CanCollide = properties.CanCollide
					part.CanTouch = properties.CanTouch
					part.CanQuery = properties.CanQuery
					part.Massless = properties.Massless
					part.CustomPhysicalProperties = properties.CustomPhysicalProperties
				else
					part.CanCollide = false
					part.CanTouch = false
				end
			end)
		end
	end
end
local function placeSavedState(state, pivot)
	if not state.Vehicle or not state.Vehicle.Parent then
		return false
	end
	pcall(function()
		state.Vehicle:PivotTo(pivot)
	end)
	for part, properties in pairs(state.Parts) do
		if part and part.Parent then
			pcall(function()
				part.CFrame = pivot * properties.LocalCFrame
				zeroPart(part)
			end)
		end
	end
	return true
end
local function inflateMass(root)
	savedRootProps = root.CustomPhysicalProperties
	local current = root.CurrentPhysicalProperties
	local baseDensity = current and current.Density or 1
	pcall(function()
		root.Massless = false
		root.CustomPhysicalProperties = PhysicalProperties.new(
			baseDensity * CONFIG.MassMultiplier,
			0.3, 0, 100, 100
		)
	end)
end
local function restoreMass(root)
	if root and root.Parent then
		pcall(function()
			root.CustomPhysicalProperties = savedRootProps
		end)
	end
	savedRootProps = nil
end
local function sendPitRequest()
	if not ownVehicle or not targetVehicle or not RequestPitRemote then
		return
	end
	pcall(function()
		RequestPitRemote:FireServer(ownVehicle, targetVehicle)
	end)
end
local function computeApproachCFrame()
	local look = targetRoot.CFrame.LookVector
	local right = targetRoot.CFrame.RightVector
	local up = targetRoot.CFrame.UpVector
	local size = targetRoot.Size
	local contact = targetRoot.Position
		- look * (size.Z * 0.5 * 0.85)
		+ right * attackSide * (size.X * 0.5)
	local position = contact - look * (ownRoot.Size.Z * 0.5 + CONFIG.RearGap)
	return CFrame.lookAt(position, position + look, up)
end
local function updateRam(deltaTime)
	if not attacking then
		return
	end
	if not ownVehicle or not ownVehicle.Parent
		or not ownRoot or not ownRoot.Parent
		or not targetVehicle or not targetVehicle.Parent
		or not targetRoot or not targetRoot.Parent then
		return
	end
	if not didInitialPlace then
		pcall(function()
			ownVehicle:PivotTo(computeApproachCFrame())
		end)
		didInitialPlace = true
	end
	local distance = (ownRoot.Position - targetRoot.Position).Magnitude
	local reach = targetRoot.Size.Z * 0.5 + ownRoot.Size.Z * 0.5
	if distance > reach + CONFIG.RepositionDistance then
		pcall(function()
			ownVehicle:PivotTo(computeApproachCFrame())
		end)
	end
	local aim = targetRoot.Position
		- targetRoot.CFrame.LookVector * (targetRoot.Size.Z * 0.5 * 0.85)
		+ targetRoot.CFrame.RightVector * attackSide * (targetRoot.Size.X * 0.4)
	local direction = aim - ownRoot.Position
	direction = direction.Magnitude > 0.001 and direction.Unit or targetRoot.CFrame.LookVector
	pcall(function()
		ownRoot.AssemblyLinearVelocity =
			direction * CONFIG.RamSpeed + targetRoot.AssemblyLinearVelocity
		ownRoot.AssemblyAngularVelocity =
			targetRoot.CFrame.UpVector * attackSide * CONFIG.SpinSpeed
	end)
	pitTimer = pitTimer + deltaTime
	if pitTimer >= CONFIG.PitInterval then
		pitTimer = 0
		sendPitRequest()
		attackSide = -attackSide
	end
end
local function clearState()
	ownVehicle, ownRoot = nil, nil
	targetVehicle, targetRoot = nil, nil
	savedState = nil
	pitTimer = 0
	didInitialPlace = false
end
local function restoreVehicle()
	if restoring or not savedState then
		return
	end
	restoring = true
	restoreMass(ownRoot)
	local state = savedState
	local exactPivot = state.Pivot
	local liftedPivot =
		CFrame.new(exactPivot.Position + Vector3.new(0, CONFIG.ReturnLift, 0))
		* exactPivot.Rotation
	task.spawn(function()
		setCollision(state, false)
		for _ = 1, CONFIG.LiftFrames do
			if not placeSavedState(state, liftedPivot) then break end
			RunService.Heartbeat:Wait()
		end
		for _ = 1, CONFIG.ExactFrames do
			if not placeSavedState(state, exactPivot) then break end
			RunService.Heartbeat:Wait()
		end
		setCollision(state, true)
		for _ = 1, CONFIG.SettleFrames do
			if not placeSavedState(state, exactPivot) then break end
			RunService.Heartbeat:Wait()
		end
		restoring = false
		clearState()
	end)
end
local function stopAttack()
	if not attacking then
		return
	end
	attacking = false
	if attackConnection then
		attackConnection:Disconnect()
		attackConnection = nil
	end
	restoreVehicle()
end
local function startAttack()
	if attacking or restoring then
		return
	end
	boostSimulation()
	local vehicle, root = getDrivenVehicle()
	if not vehicle or not root then
		warn("[CARUNOHUB Ram] Sit in the driver seat first")
		return
	end
	local nearest, nearestRoot = findNearestVehicle(vehicle, root)
	if not nearest or not nearestRoot then
		warn("[CARUNOHUB Ram] No nearby vehicle")
		return
	end
	ownVehicle, ownRoot = vehicle, root
	targetVehicle, targetRoot = nearest, nearestRoot
	savedState = createSavedState(vehicle, root)
	didInitialPlace = false
	inflateMass(root)
	local relative = root.Position - nearestRoot.Position
	attackSide = relative:Dot(nearestRoot.CFrame.RightVector) < 0 and 1 or -1
	pitTimer = CONFIG.PitInterval
	attacking = true
	attackConnection = RunService.PreSimulation:Connect(updateRam)
	warn("[CARUNOHUB Ram] Target: " .. nearest.Name
		.. (isTargetOccupied(nearest) and " (occupied)" or " (empty)"))
end
local function handleAlt(_, inputState)
	if inputState == Enum.UserInputState.Begin then
		startAttack()
	elseif inputState == Enum.UserInputState.End
		or inputState == Enum.UserInputState.Cancel then
		stopAttack()
	end
	return Enum.ContextActionResult.Sink
end
ContextActionService:BindActionAtPriority(
	ACTION_NAME, handleAlt, false, 9999,
	Enum.KeyCode.LeftAlt, Enum.KeyCode.RightAlt
)
task.spawn(function()
	while running do
		boostSimulation()
		task.wait(0.2)
	end
end)
env.VehiclePhysRamCleanup = function()
	if not running then
		return
	end
	running = false
	ContextActionService:UnbindAction(ACTION_NAME)
	stopAttack()
	env.VehiclePhysRamCleanup = nil
end
boostSimulation()
]==]
local COLLISION_SOURCE = [==[local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local env = (getgenv and getgenv()) or _G
for _, name in ipairs({
	"VehicleGhostCleanup",
	"VehicleOnlyCollisionCleanup",
	"VehicleCollisionOnlyCleanup",
}) do
	if type(env[name]) == "function" then
		pcall(env[name])
	end
end
local player = Players.LocalPlayer
local running = true
local constraints = {}
local function destroyConstraint(constraint)
	constraints[constraint] = nil
	if constraint and constraint.Parent then
		constraint:Destroy()
	end
end
local function clearConstraints()
	for constraint in pairs(constraints) do
		pcall(destroyConstraint, constraint)
	end
	table.clear(constraints)
end
local function getVehiclesFolder()
	return Workspace:FindFirstChild("Vehicles")
end
local function getCurrentVehicle()
	local character = player.Character
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	local seat = humanoid and humanoid.SeatPart
	local vehicles = getVehiclesFolder()
	if not seat or not seat:IsA("VehicleSeat") or not vehicles then
		return nil
	end
	local object = seat
	while object and object.Parent ~= vehicles do
		object = object.Parent
	end
	if object and object.Parent == vehicles and object:IsA("Model") then
		return object
	end
	return nil
end
local function addBaseParts(container, output)
	if not container then
		return
	end
	for _, object in ipairs(container:GetDescendants()) do
		if object:IsA("BasePart") then
			table.insert(output, object)
		end
	end
end
local function addWheelColliders(wheels, output)
	if not wheels then
		return
	end
	for _, wheel in ipairs(wheels:GetChildren()) do
		local collider = wheel:FindFirstChild("Collider")
		if collider and collider:IsA("BasePart") then
			table.insert(output, collider)
		end
	end
end
local function getVehicleColliders(vehicle)
	local result = {}
	local body = vehicle and vehicle:FindFirstChild("Body")
	if not body then
		return result
	end
	addBaseParts(body:FindFirstChild("Colliders"), result)
	addWheelColliders(vehicle:FindFirstChild("Wheels"), result)
	local trailer = body:FindFirstChild("Trailer")
	if trailer then
		addBaseParts(trailer:FindFirstChild("Colliders"), result)
		addWheelColliders(trailer:FindFirstChild("Wheels"), result)
	end
	return result
end
local function reconcile()
	local vehicles = getVehiclesFolder()
	local ownVehicle = getCurrentVehicle()
	if not vehicles or not ownVehicle then
		clearConstraints()
		return
	end
	local ownParts = getVehicleColliders(ownVehicle)
	local desired = {}
	for _, otherVehicle in ipairs(vehicles:GetChildren()) do
		if otherVehicle:IsA("Model") and otherVehicle ~= ownVehicle then
			local otherParts = getVehicleColliders(otherVehicle)
			for _, ownPart in ipairs(ownParts) do
				if ownPart.Parent then
					local partMap = desired[ownPart]
					if not partMap then
						partMap = {}
						desired[ownPart] = partMap
					end
					for _, otherPart in ipairs(otherParts) do
						if otherPart.Parent then
							partMap[otherPart] = true
						end
					end
				end
			end
		end
	end
	for constraint in pairs(constraints) do
		local part0 = constraint.Part0
		local part1 = constraint.Part1
		local partMap = part0 and desired[part0]
		if not partMap or not partMap[part1] then
			destroyConstraint(constraint)
		else
			partMap[part1] = nil
		end
	end
	for ownPart, partMap in pairs(desired) do
		for otherPart in pairs(partMap) do
			local constraint = Instance.new("NoCollisionConstraint")
			constraint.Name = "__VehicleCollisionOnly"
			constraint.Part0 = ownPart
			constraint.Part1 = otherPart
			constraint.Parent = ownPart
			constraints[constraint] = true
		end
	end
end
env.VehicleCollisionOnlyCleanup = function()
	if not running then
		return
	end
	running = false
	clearConstraints()
	env.VehicleCollisionOnlyCleanup = nil
end
task.spawn(function()
	while running do
		pcall(reconcile)
		task.wait(0.25)
	end
end)
]==]
local GATE_SOURCE = [==[local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local CollectionService = game:GetService("CollectionService")
local env = (getgenv and getgenv()) or _G
if type(env.GateBarrierCollisionCleanup) == "function" then
	pcall(env.GateBarrierCollisionCleanup)
end
local BARRIER_GROUP = "GateBarrier"
local GATE_TAG = "Gate"
local player = Players.LocalPlayer
local running = true
local constraints = {}
local function destroyConstraint(constraint)
	constraints[constraint] = nil
	if constraint and constraint.Parent then
		constraint:Destroy()
	end
end
local function clearConstraints()
	for constraint in pairs(constraints) do
		pcall(destroyConstraint, constraint)
	end
	table.clear(constraints)
end
local function isBarrierPart(part)
	if not part:IsA("BasePart") or not part.CanCollide then
		return false
	end
	local ok, group = pcall(function()
		return part.CollisionGroup
	end)
	return ok and group == BARRIER_GROUP
end
local function collectBarrierParts()
	local parts = {}
	for _, gate in ipairs(CollectionService:GetTagged(GATE_TAG)) do
		if gate:IsDescendantOf(Workspace) then
			if isBarrierPart(gate) then
				table.insert(parts, gate)
			end
			for _, descendant in ipairs(gate:GetDescendants()) do
				if isBarrierPart(descendant) then
					table.insert(parts, descendant)
				end
			end
		end
	end
	if #parts == 0 then
		for _, object in ipairs(Workspace:GetDescendants()) do
			if isBarrierPart(object) then
				table.insert(parts, object)
			end
		end
	end
	return parts
end
local function getVehiclesFolder()
	return Workspace:FindFirstChild("Vehicles")
end
local function getCurrentVehicle()
	local character = player.Character
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	local seat = humanoid and humanoid.SeatPart
	local vehicles = getVehiclesFolder()
	if not seat or not vehicles then
		return nil
	end
	local object = seat
	while object and object.Parent ~= vehicles do
		object = object.Parent
	end
	if object and object.Parent == vehicles and object:IsA("Model") then
		return object
	end
	return nil
end
local function addBaseParts(container, output)
	if not container then
		return
	end
	for _, object in ipairs(container:GetDescendants()) do
		if object:IsA("BasePart") then
			table.insert(output, object)
		end
	end
end
local function addWheelColliders(wheels, output)
	if not wheels then
		return
	end
	for _, wheel in ipairs(wheels:GetChildren()) do
		local collider = wheel:FindFirstChild("Collider")
		if collider and collider:IsA("BasePart") then
			table.insert(output, collider)
		end
	end
end
local function getMyParts()
	local parts = {}
	local vehicle = getCurrentVehicle()
	if vehicle then
		local body = vehicle:FindFirstChild("Body")
		if body then
			addBaseParts(body:FindFirstChild("Colliders"), parts)
			local trailer = body:FindFirstChild("Trailer")
			if trailer then
				addBaseParts(trailer:FindFirstChild("Colliders"), parts)
				addWheelColliders(trailer:FindFirstChild("Wheels"), parts)
			end
		end
		addWheelColliders(vehicle:FindFirstChild("Wheels"), parts)
		local root = vehicle.PrimaryPart or vehicle:FindFirstChild("Root")
		if root and root:IsA("BasePart") then
			table.insert(parts, root)
		end
	end
	local character = player.Character
	if character then
		for _, object in ipairs(character:GetDescendants()) do
			if object:IsA("BasePart") then
				table.insert(parts, object)
			end
		end
	end
	return parts
end
local function reconcile()
	local myParts = getMyParts()
	if #myParts == 0 then
		clearConstraints()
		return
	end
	local barrierParts = collectBarrierParts()
	if #barrierParts == 0 then
		clearConstraints()
		return
	end
	local desired = {}
	for _, myPart in ipairs(myParts) do
		if myPart.Parent then
			local partMap = desired[myPart]
			if not partMap then
				partMap = {}
				desired[myPart] = partMap
			end
			for _, barrierPart in ipairs(barrierParts) do
				if barrierPart.Parent then
					partMap[barrierPart] = true
				end
			end
		end
	end
	for constraint in pairs(constraints) do
		local part0 = constraint.Part0
		local part1 = constraint.Part1
		local partMap = part0 and desired[part0]
		if not partMap or not partMap[part1] then
			destroyConstraint(constraint)
		else
			partMap[part1] = nil
		end
	end
	for myPart, partMap in pairs(desired) do
		for barrierPart in pairs(partMap) do
			local constraint = Instance.new("NoCollisionConstraint")
			constraint.Name = "__GateBarrierPass"
			constraint.Part0 = myPart
			constraint.Part1 = barrierPart
			constraint.Parent = myPart
			constraints[constraint] = true
		end
	end
end
env.GateBarrierCollisionCleanup = function()
	if not running then
		return
	end
	running = false
	clearConstraints()
	env.GateBarrierCollisionCleanup = nil
end
task.spawn(function()
	while running do
		pcall(reconcile)
		task.wait(0.5)
	end
end)
]==]
local EXTERNAL_AUTO_FARM_SOURCE = [==[loadstring(game:HttpGet("https://pastebin.com/raw/BjUC6X2b"))()
]==]
local NO_RECOIL_SOURCE = [==[local ReplicatedStorage = game:GetService("ReplicatedStorage")
local environment = (getgenv and getgenv()) or _G
if type(environment.CarunoNoRecoilCleanup) == "function" then
	pcall(environment.CarunoNoRecoilCleanup)
end
local gunConfig = require(
	ReplicatedStorage
		:WaitForChild("SharedModules")
		:WaitForChild("Configs")
		:WaitForChild("GunConfig")
)
local cameraController = require(
	ReplicatedStorage
		:WaitForChild("ClientModules")
		:WaitForChild("CameraController")
)
local running = true
local savedStats = {}
local originalImpulsePitch = cameraController.ImpulsePitch
local originalGetRecoilSpring = cameraController.GetRecoilSpring
local realRecoilSpring = cameraController:GetRecoilSpring()
local silentRecoilSpring = setmetatable({
	Impulse = function()
		return nil
	end,
}, {
	__index = realRecoilSpring,
	__newindex = function(_, key, value)
		realRecoilSpring[key] = value
	end,
})
local function clearRecoilSpring()
	pcall(function()
		realRecoilSpring.Position = 0
		realRecoilSpring.Velocity = 0
		realRecoilSpring.Target = 0
	end)
end
local function patchGunStats()
	for _, config in pairs(gunConfig) do
		local stats = type(config) == "table" and config.Stats
		if type(stats) == "table" then
			if not savedStats[stats] then
				savedStats[stats] = {
					HasFirstPerson = rawget(stats, "FirstPersonCameraRecoilFactor") ~= nil,
					HasThirdPerson = rawget(stats, "ThirdPersonCameraRecoilFactor") ~= nil,
					FirstPerson = stats.FirstPersonCameraRecoilFactor,
					ThirdPerson = stats.ThirdPersonCameraRecoilFactor,
				}
			end
			stats.FirstPersonCameraRecoilFactor = 0
			stats.ThirdPersonCameraRecoilFactor = 0
		end
	end
	clearRecoilSpring()
end
local patchedImpulsePitch = function()
	return nil
end
local patchedGetRecoilSpring = function()
	return silentRecoilSpring
end
cameraController.ImpulsePitch = patchedImpulsePitch
cameraController.GetRecoilSpring = patchedGetRecoilSpring
local function cleanup()
	if not running then
		return
	end
	running = false
	if cameraController.ImpulsePitch == patchedImpulsePitch then
		cameraController.ImpulsePitch = originalImpulsePitch
	end
	if cameraController.GetRecoilSpring == patchedGetRecoilSpring then
		cameraController.GetRecoilSpring = originalGetRecoilSpring
	end
	for stats, saved in pairs(savedStats) do
		pcall(function()
			if saved.HasFirstPerson then
				stats.FirstPersonCameraRecoilFactor = saved.FirstPerson
			else
				stats.FirstPersonCameraRecoilFactor = nil
			end
			if saved.HasThirdPerson then
				stats.ThirdPersonCameraRecoilFactor = saved.ThirdPerson
			else
				stats.ThirdPersonCameraRecoilFactor = nil
			end
		end)
	end
	table.clear(savedStats)
	clearRecoilSpring()
	if environment.CarunoNoRecoilCleanup == cleanup then
		environment.CarunoNoRecoilCleanup = nil
	end
end
environment.CarunoNoRecoilCleanup = cleanup
patchGunStats()
task.spawn(function()
	while running do
		patchGunStats()
		task.wait(0.15)
	end
end)
]==]
local function getFeatureEnvironment()
	if type(getgenv) == "function" then
		local success, environment = pcall(getgenv)
		if success and type(environment) == "table" then
			return environment
		end
	end
	return _G
end
local function runFeatureSource(source, chunkName)
	if type(loadstring) ~= "function" then
		return false, "Executor required"
	end
	local chunk, compileError = loadstring(source, chunkName)
	if not chunk then
		return false, compileError
	end
	local success, runtimeError = pcall(chunk)
	if not success then
		return false, runtimeError
	end
	return true
end
local function stopFeature(cleanupName)
	local environment = getFeatureEnvironment()
	local cleanup = environment[cleanupName]
	if type(cleanup) == "function" then
		local success, cleanupError = pcall(cleanup)
		if not success then
			return false, cleanupError
		end
	end
	return true
end
local borderSpeedLimitEnabled = false
local borderSpeedLimitConfig
local borderSpeedLimitOriginalRegion
local borderSpeedLimitPatchedRegion
local function startBorderSpeedLimitRemoval()
	if borderSpeedLimitEnabled then
		return true
	end
	local ReplicatedStorage = game:GetService("ReplicatedStorage")
	local configModule = ReplicatedStorage
		:WaitForChild("SharedModules")
		:WaitForChild("Configs")
		:WaitForChild("RegionSpeedLimits")
	local required, config = pcall(require, configModule)
	if not required or type(config) ~= "table" or type(config.Regions) ~= "table" then
		return false, required and "RegionSpeedLimits config was not found" or config
	end
	local originalRegion = config.Regions.BorderSpeedLimitRegion
	if type(originalRegion) ~= "table" then
		return false, "BorderSpeedLimitRegion was not found"
	end
	local patchedRegion = {}
	for key, value in pairs(originalRegion) do
		patchedRegion[key] = value
	end
	patchedRegion.MaxMPH = 10000000
	patchedRegion.BrakeTorqueMultiplier = 0
	patchedRegion.NotificationMessageFormat = ""
	patchedRegion.NotificationDuration = 0
	patchedRegion.NotificationMPHOffset = 0
	local changed, changeError = pcall(function()
		config.Regions.BorderSpeedLimitRegion = patchedRegion
	end)
	if not changed then
		return false, changeError
	end
	borderSpeedLimitConfig = config
	borderSpeedLimitOriginalRegion = originalRegion
	borderSpeedLimitPatchedRegion = patchedRegion
	borderSpeedLimitEnabled = true
	return true
end
local function stopBorderSpeedLimitRemoval()
	if borderSpeedLimitConfig
		and type(borderSpeedLimitConfig.Regions) == "table"
		and borderSpeedLimitConfig.Regions.BorderSpeedLimitRegion == borderSpeedLimitPatchedRegion then
		pcall(function()
			borderSpeedLimitConfig.Regions.BorderSpeedLimitRegion =
				borderSpeedLimitOriginalRegion
		end)
	end
	borderSpeedLimitConfig = nil
	borderSpeedLimitOriginalRegion = nil
	borderSpeedLimitPatchedRegion = nil
	borderSpeedLimitEnabled = false
	return true
end
local runtimeFeatures = {
	infiniteFuel = false,
	speedHack = false,
	vehicleSpeed = false,
	infiniteStamina = false,
}
local function getLocalCharacterAndHumanoid()
	local character = player.Character
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	return character, humanoid
end
local function getDrivenVehicle()
	local _, humanoid = getLocalCharacterAndHumanoid()
	local seat = humanoid and humanoid.SeatPart
	local vehicles = Workspace:FindFirstChild("Vehicles")
	if not seat or not vehicles then
		return nil, nil
	end
	local object = seat
	while object and object.Parent ~= vehicles do
		object = object.Parent
	end
	if not object or object.Parent ~= vehicles or not object:IsA("Model") then
		return nil, nil
	end
	local root = object:FindFirstChild("Root")
	if not root or not root:IsA("BasePart") then
		root = object.PrimaryPart or seat.AssemblyRootPart
	end
	return object, root
end
local function scanGarbageCollectedTables(callback)
	if type(getgc) ~= "function" then
		return false
	end
	local success, objects = pcall(getgc, true)
	if not success or type(objects) ~= "table" then
		return false
	end
	for _, object in ipairs(objects) do
		if type(object) == "table" then
			pcall(callback, object)
		end
	end
	return true
end
local fuelInfoTables = setmetatable({}, { __mode = "k" })
local lastFuelInfoScan = 0
local function patchVehicleFuel(vehicle, root)
	if not vehicle or not vehicle.Parent then
		return false
	end
	local maxFuel = vehicle:GetAttribute("MaxFuel")
	if type(maxFuel) ~= "number" or maxFuel <= 0 then
		maxFuel = vehicle:GetAttribute("Fuel")
	end
	if type(maxFuel) ~= "number" or maxFuel <= 0 then
		return false
	end
	pcall(function()
		vehicle:SetAttribute("CurrentFuel", maxFuel)
		vehicle:SetAttribute("Fuel", maxFuel)
	end)
	if lastFuelInfoScan == 0 or os.clock() - lastFuelInfoScan >= 1 then
		lastFuelInfoScan = os.clock()
		scanGarbageCollectedTables(function(object)
			if type(rawget(object, "CurrentFuel")) == "number"
				and type(rawget(object, "MaxFuel")) == "number"
				and typeof(rawget(object, "Root")) == "Instance" then
				fuelInfoTables[object] = true
			end
		end)
	end
	for object in pairs(fuelInfoTables) do
		if rawget(object, "Root") == root then
			object.CurrentFuel = maxFuel
			object.MaxFuel = maxFuel
		end
	end
	return true
end
local function startInfiniteFuel()
	runtimeFeatures.infiniteFuel = true
	local vehicle, root = getDrivenVehicle()
	if vehicle then
		patchVehicleFuel(vehicle, root)
	end
	return true
end
local function stopInfiniteFuel()
	runtimeFeatures.infiniteFuel = false
	return true
end
local function disableSignalConnections(signal, registry, ignoredFunction)
	local resolved = getconnections
	if type(resolved) ~= "function" then
		local ok, value = pcall(function()
			return (getgenv and getgenv().getconnections) or _G.getconnections
		end)
		resolved = ok and value or nil
	end
	if type(resolved) ~= "function" then
		return false, "getconnections unavailable"
	end
	local success, signalConnections = pcall(resolved, signal)
	if not success or type(signalConnections) ~= "table" then
		return false, "Cannot inspect event connections"
	end
	for _, connection in ipairs(signalConnections) do
		local callback
		pcall(function()
			callback = connection.Function
		end)
		if callback ~= ignoredFunction and not registry[connection] then
			local disabled = pcall(function()
				connection:Disable()
			end)
			if disabled then
				registry[connection] = true
			end
		end
	end
	return true
end
local function enableSignalConnections(registry)
	for connection in pairs(registry) do
		pcall(function()
			connection:Enable()
		end)
		registry[connection] = nil
	end
end
local antiPitEnabled = false
local disabledPitConnections = {}
local function refreshAntiPitConnections()
	local remotes = ReplicatedStorage:FindFirstChild("__remotes")
	local vehicleService = remotes and remotes:FindFirstChild("VehicleService")
	local remote = vehicleService
		and vehicleService:FindFirstChild("VehiclePitManeuver")
	if not remote or not remote:IsA("RemoteEvent") then
		return false, "VehiclePitManeuver remote not found"
	end
	return disableSignalConnections(remote.OnClientEvent, disabledPitConnections)
end
local function startAntiPit()
	antiPitEnabled = true
	local success, featureError = refreshAntiPitConnections()
	if not success then
		antiPitEnabled = false
		return false, featureError
	end
	task.delay(0.75, function()
		if antiPitEnabled then
			refreshAntiPitConnections()
		end
	end)
	return true
end
local function stopAntiPit()
	antiPitEnabled = false
	enableSignalConnections(disabledPitConnections)
	return true
end
local AC_CONFIG = {
	SOFT_ROLLBACK       = true,
	IGNORE_LIMIT        = 18,
	ROLLBACK_HARD_LIMIT = 120,
	DEATH_WINDOW        = 12,
	DEATH_LIMIT         = 3,
	ACK_MIN_DELAY       = 0.040,
	ACK_MAX_DELAY       = 0.110,
	AIR_GUARD           = 2.5,
	FALLBACK_PERIOD     = 3.0,
}
AC_CONFIG.startVehicleSpeed = function()
	runtimeFeatures.vehicleSpeed = true
	return true
end
AC_CONFIG.stopVehicleSpeed = function()
	runtimeFeatures.vehicleSpeed = false
	AC_CONFIG.restoreVehicles()
	return true
end
AC_CONFIG.resolveController = function()
	if AC_CONFIG.Controller then
		return AC_CONFIG.Controller
	end
	local ok, controller = pcall(function()
		return require(
			ReplicatedStorage
				:WaitForChild("ClientModules", 5)
				:WaitForChild("MovementController", 5)
		)
	end)
	if ok and type(controller) == "table"
		and type(controller.SetWalkSpeedModifier) == "function"
		and type(controller.GetWalkSpeed) == "function" then
		AC_CONFIG.Controller = controller
		return controller
	end
	return nil
end
AC_CONFIG.resolveGeometry = function()
	if AC_CONFIG.Geometry then
		return AC_CONFIG.Geometry
	end
	local ok, geometry = pcall(function()
		return require(
			ReplicatedStorage
				:WaitForChild("SharedModules", 5)
				:WaitForChild("AntiCheatGeometry", 5)
		)
	end)
	if ok and type(geometry) == "table" then
		AC_CONFIG.Geometry = geometry
	end
	return AC_CONFIG.Geometry
end
AC_CONFIG.updateAirborne = function(vehicle, deltaTime)
	local geometry = AC_CONFIG.resolveGeometry()
	if not vehicle or not geometry
		or type(geometry.IsVehicleGrounded) ~= "function" then
		AC_CONFIG.AirborneSince = nil
		return false
	end
	AC_CONFIG.GroundPoll = (AC_CONFIG.GroundPoll or 0) + deltaTime
	if AC_CONFIG.GroundPoll >= 0.15 then
		AC_CONFIG.GroundPoll = 0
		local ok, grounded = pcall(geometry.IsVehicleGrounded, vehicle)
		if ok and grounded then
			AC_CONFIG.AirborneSince = nil
		elseif ok and not AC_CONFIG.AirborneSince then
			AC_CONFIG.AirborneSince = os.clock()
		end
	end
	local since = AC_CONFIG.AirborneSince
	return since ~= nil and (os.clock() - since) >= AC_CONFIG.AIR_GUARD
end
AC_CONFIG.VehicleAttrs = setmetatable({}, { __mode = "k" })
AC_CONFIG.resolveVehicle = function(humanoid)
	if not humanoid then
		return nil
	end
	local ok, vehicle = pcall(function()
		return VehicleUtil:GetHumanoidDrivenVehicle(humanoid)
	end)
	if ok and vehicle then
		return vehicle
	end
	local seat = humanoid.SeatPart
	if not seat then
		return nil
	end
	local ok2, fallback = pcall(function()
		return VehicleUtil:GetVehicleModelFromPart(seat)
	end)
	if ok2 then
		return fallback
	end
	return nil
end
AC_CONFIG.boostVehicle = function(vehicle)
	if not vehicle then
		return false
	end
	local saved = AC_CONFIG.VehicleAttrs[vehicle]
	if not saved then
		saved = {
			Top = vehicle:GetAttribute("TopSpeedMultiplier"),
			Power = vehicle:GetAttribute("EnginePowerMultiplier"),
		}
		AC_CONFIG.VehicleAttrs[vehicle] = saved
	end
	local top = saved.Top
	if type(top) ~= "number" or top <= 0 then
		top = 1
	end
	local power = saved.Power
	if type(power) ~= "number" or power <= 0 then
		power = 1
	end
	local multiplier = math.clamp(values.vehicleAltSpeed / 100, 1, 6)
	local target = top * multiplier
	local current = vehicle:GetAttribute("TopSpeedMultiplier")
	if type(current) == "number" and math.abs(current - target) < 0.001 then
		return true
	end
	return (pcall(function()
		vehicle:SetAttribute("TopSpeedMultiplier", target)
		vehicle:SetAttribute("EnginePowerMultiplier", power * multiplier)
	end))
end
AC_CONFIG.restoreVehicles = function()
	for vehicle, saved in pairs(AC_CONFIG.VehicleAttrs) do
		if vehicle and vehicle.Parent then
			pcall(function()
				vehicle:SetAttribute("TopSpeedMultiplier", saved.Top)
				vehicle:SetAttribute("EnginePowerMultiplier", saved.Power)
			end)
		end
		AC_CONFIG.VehicleAttrs[vehicle] = nil
	end
end
AC_CONFIG.setSpeedModifier = function(delta)
	local controller = AC_CONFIG.resolveController()
	if not controller then
		return false
	end
	if delta and math.abs((AC_CONFIG.AppliedDelta or 0) - delta) < 0.01 then
		return true
	end
	AC_CONFIG.AppliedDelta = delta
	return (pcall(function()
		controller:SetWalkSpeedModifier("CarunoHub", delta)
	end))
end
local function restoreSpeed()
	AC_CONFIG.setSpeedModifier(nil)
	AC_CONFIG.AppliedDelta = nil
	AC_CONFIG.AirborneSince = nil
	AC_CONFIG.FootAirSince = nil
	AC_CONFIG.restoreVehicles()
	for humanoid, walkSpeed in pairs(speedSaved) do
		if humanoid and humanoid.Parent then
			pcall(function()
				humanoid.WalkSpeed = walkSpeed
			end)
		end
		speedSaved[humanoid] = nil
	end
end
local function startSpeedHack()
	runtimeFeatures.speedHack = true
	return true
end
local function stopSpeedHack()
	runtimeFeatures.speedHack = false
	restoreSpeed()
	return true
end
local movementController
local staminaGetter
local staminaUpvalueIndex
local staminaSetupValue
local function resolveStaminaUpvalue()
	if staminaGetter and staminaUpvalueIndex and staminaSetupValue then
		return true
	end
	local success, controller = pcall(function()
		return require(
			ReplicatedStorage
				:WaitForChild("ClientModules")
				:WaitForChild("MovementController")
		)
	end)
	if not success or type(controller) ~= "table"
		or type(controller.GetStamina) ~= "function" then
		return false
	end
	local debugLibrary = debug
	local getUpvalues = (debugLibrary and debugLibrary.getupvalues)
		or getupvalues
	local setupValue = (debugLibrary and debugLibrary.setupvalue)
		or setupvalue
	if type(getUpvalues) ~= "function" or type(setupValue) ~= "function" then
		return false
	end
	local gotUpvalues, upvalues = pcall(getUpvalues, controller.GetStamina)
	if not gotUpvalues or type(upvalues) ~= "table" then
		return false
	end
	local currentStamina = controller:GetStamina()
	if type(currentStamina) ~= "number" then
		return false
	end
	for index, value in pairs(upvalues) do
		if type(index) == "number"
			and type(value) == "number"
			and math.abs(value - currentStamina) < 0.001 then
			movementController = controller
			staminaGetter = controller.GetStamina
			staminaUpvalueIndex = index
			staminaSetupValue = setupValue
			return true
		end
	end
	return false
end
local function refillStamina()
	if not resolveStaminaUpvalue() then
		return false
	end
	return pcall(
		staminaSetupValue,
		staminaGetter,
		staminaUpvalueIndex,
		200
	)
end
local function startInfiniteStamina()
	if not refillStamina() then
		return false, "Executor required"
	end
	runtimeFeatures.infiniteStamina = true
	return true
end
local function stopInfiniteStamina()
	runtimeFeatures.infiniteStamina = false
	return true
end
connect(UserInputService.InputBegan, function(input)
	if input.KeyCode == Enum.KeyCode.LeftAlt
		or input.KeyCode == Enum.KeyCode.RightAlt then
		if UserInputService:GetFocusedTextBox() then
			return
		end
		altHeld = true
	end
end)
connect(UserInputService.InputEnded, function(input)
	if input.KeyCode == Enum.KeyCode.LeftAlt
		or input.KeyCode == Enum.KeyCode.RightAlt then
		altHeld = UserInputService:IsKeyDown(Enum.KeyCode.LeftAlt)
			or UserInputService:IsKeyDown(Enum.KeyCode.RightAlt)
		if not altHeld then
			restoreSpeed()
		end
	end
end)
local function getInstancePosition(instance)
	if not instance then
		return nil
	end
	if instance:IsA("BasePart") then
		return instance.Position
	end
	if instance:IsA("Model") then
		return instance:GetPivot().Position
	end
	local part = instance:FindFirstChildWhichIsA("BasePart", true)
	return part and part.Position or nil
end
local fuelPatchAccumulator = 0
connect(RunService.Heartbeat, function(deltaTime)
	if runtimeFeatures.infiniteFuel then
		fuelPatchAccumulator = fuelPatchAccumulator + deltaTime
		if fuelPatchAccumulator >= 0.05 then
			fuelPatchAccumulator = 0
			local vehicle, root = getDrivenVehicle()
			if vehicle then
				patchVehicleFuel(vehicle, root)
			end
		end
	else
		fuelPatchAccumulator = 0
	end
	if altHeld and (runtimeFeatures.speedHack or runtimeFeatures.vehicleSpeed) then
		local _, humanoid = getLocalCharacterAndHumanoid()
		if humanoid and not humanoid.SeatPart and runtimeFeatures.speedHack then
			local base = 16
			pcall(function()
				base = game.StarterPlayer.CharacterWalkSpeed
			end)
			if humanoid.FloorMaterial == Enum.Material.Air then
				AC_CONFIG.FootAirSince = AC_CONFIG.FootAirSince or os.clock()
			else
				AC_CONFIG.FootAirSince = nil
			end
			if AC_CONFIG.FootAirSince
				and os.clock() - AC_CONFIG.FootAirSince >= AC_CONFIG.AIR_GUARD then
				AC_CONFIG.setSpeedModifier(nil)
			else
				AC_CONFIG.setSpeedModifier(values.altSpeed - base)
			end
		elseif humanoid and runtimeFeatures.vehicleSpeed then
			local seat = humanoid.SeatPart
			local root = seat and (seat.AssemblyRootPart or seat)
			if root then
				local vehicle = AC_CONFIG.resolveVehicle(humanoid)
				if not vehicle then
					warnVehicleSpeedOnce()
				end
				if AC_CONFIG.updateAirborne(vehicle, deltaTime) then
					local velocity = root.AssemblyLinearVelocity
					root.AssemblyLinearVelocity = Vector3.new(
						velocity.X,
						math.min(velocity.Y, -40),
						velocity.Z
					)
				else
					AC_CONFIG.boostVehicle(vehicle)
				end
			end
		end
	end
	if runtimeFeatures.infiniteStamina then
		refillStamina()
	end
end)
AC_CONFIG.resolveVehicle = function(humanoid)
	if not humanoid then
		return nil
	end
	if VehicleUtil then
		local ok, vehicle = pcall(function()
			return VehicleUtil:GetHumanoidDrivenVehicle(humanoid)
		end)
		if ok and vehicle then
			return vehicle
		end
		local seat = humanoid.SeatPart
		if seat then
			local okPart, fallback = pcall(function()
				return VehicleUtil:GetVehicleModelFromPart(seat)
			end)
			if okPart and fallback then
				return fallback
			end
		end
	end
	local vehicle = getDrivenVehicle()
	return vehicle
end
local function getVehicleStockTopSpeedMph(vehicle)
	local gears = vehicle and vehicle:FindFirstChild("Gears")
	if not gears then
		return nil
	end
	local best = 0
	for _, gear in ipairs(gears:GetChildren()) do
		local maxSpeed = gear:GetAttribute("MaxSpeed")
		if type(maxSpeed) == "number" then
			best = math.max(best, math.abs(maxSpeed))
		end
	end
	if best <= 0 then
		return nil
	end
	return best
end
AC_CONFIG.SAFE_MULTIPLIER = 2
AC_CONFIG.getSafeMultiplier = function()
	local multiplier = math.clamp((values.vehicleAltSpeed or 200) / 100, 1, 6)
	if not values.vehicleAltRisky then
		multiplier = math.min(multiplier, AC_CONFIG.SAFE_MULTIPLIER)
	end
	return multiplier
end
local noGearsWarned = setmetatable({}, { __mode = "k" })
AC_CONFIG.boostVehicle = function(vehicle)
	if not vehicle or not vehicle.Parent then
		return false
	end
	local saved = AC_CONFIG.VehicleAttrs[vehicle]
	if not saved then
		saved = {
			Top = vehicle:GetAttribute("TopSpeedMultiplier"),
			Power = vehicle:GetAttribute("EnginePowerMultiplier"),
			StockMph = getVehicleStockTopSpeedMph(vehicle),
		}
		AC_CONFIG.VehicleAttrs[vehicle] = saved
		if not saved.StockMph and not noGearsWarned[vehicle] then
			noGearsWarned[vehicle] = true
			warn("[CARUNOHUB] " .. vehicle.Name .. ": no Gears folder, boost may do nothing")
		end
	end
	local top = saved.Top
	if type(top) ~= "number" or top <= 0 or top ~= top then
		top = 1
	end
	local power = saved.Power
	if type(power) ~= "number" or power <= 0 or power ~= power then
		power = 1
	end
	local multiplier = AC_CONFIG.getSafeMultiplier()
	local target = top * multiplier
	local current = vehicle:GetAttribute("TopSpeedMultiplier")
	if type(current) == "number" and math.abs(current - target) < 0.001 then
		return true
	end
	return (pcall(function()
		vehicle:SetAttribute("TopSpeedMultiplier", target)
		vehicle:SetAttribute("EnginePowerMultiplier", power * multiplier)
	end))
end
AC_CONFIG.describeBoost = function()
	local _, humanoid = getLocalCharacterAndHumanoid()
	local vehicle = humanoid and AC_CONFIG.resolveVehicle(humanoid)
	local stock = vehicle and getVehicleStockTopSpeedMph(vehicle)
	if not stock then
		return nil
	end
	local multiplier = AC_CONFIG.getSafeMultiplier()
	return string.format(
		"%s: %d mph -> %d mph (x%.2f)",
		vehicle.Name,
		math.floor(stock + 0.5),
		math.floor(stock * multiplier + 0.5),
		multiplier
	)
end
local function fetchLibrary(url)
	if type(game.HttpGet) ~= "function" and type(game.HttpGetAsync) ~= "function" then
		return nil, "Executor required"
	end
	if type(loadstring) ~= "function" then
		return nil, "Executor required"
	end
	local okSource, source = pcall(function()
		return game:HttpGet(url)
	end)
	if not okSource or type(source) ~= "string" or #source < 64 then
		return nil, "Failed to download " .. url
	end
	local chunk, compileError = loadstring(source)
	if not chunk then
		return nil, compileError
	end
	local okRun, library = pcall(chunk)
	if not okRun then
		return nil, library
	end
	return library
end
local Fluent, libraryError = fetchLibrary(
	"https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"
)
if not Fluent then
	warn("[CARUNOHUB] Fluent UI failed to load: " .. tostring(libraryError))
	return
end
local api = {}
local Window, Tabs
local localized = {}
local function notify(title, content)
	pcall(function()
		Fluent:Notify({
			Title = "CARUNOHUB",
			Content = title,
			SubContent = content,
			Duration = 8,
		})
	end)
end
Window = Fluent:CreateWindow({
	Title = "CARUNOHUB v27",
	SubTitle = "San Diego Border RP | Right Shift",
	TabWidth = 160,
	Size = UDim2.fromOffset(580, 460),
	Acrylic = false,
	Theme = "Dark",
	MinimizeKey = Enum.KeyCode.RightShift,
})
Tabs = {
	Vehicle = Window:AddTab({ Title = translate("Vehicle"), Icon = "car" }),
	Player = Window:AddTab({ Title = translate("Player"), Icon = "user" }),
	Settings = Window:AddTab({ Title = translate("Settings"), Icon = "settings" }),
}
function api.On(name, callback)
	assert(type(name) == "string", "event name must be a string")
	assert(type(callback) == "function", "callback must be a function")
	listeners[name] = listeners[name] or {}
	table.insert(listeners[name], callback)
	return function()
		local eventListeners = listeners[name]
		if not eventListeners then
			return
		end
		local index = table.find(eventListeners, callback)
		if index then
			table.remove(eventListeners, index)
		end
	end
end
function api.Get(name)
	return values[name]
end
function api.Show()
	pcall(function()
		Window:Minimize(false)
	end)
end
function api.Hide()
	pcall(function()
		Window:Minimize(true)
	end)
end
function api.Toggle()
	pcall(function()
		Window:Minimize()
	end)
end
function api.OpenPage(name)
	local order = { Vehicle = 1, Player = 2, Settings = 3 }
	local index = order[name]
	if index then
		pcall(function()
			Window:SelectTab(index)
		end)
	end
end
function api.Destroy()
	pcall(stopFeature, "VehiclePhysRamCleanup")
	pcall(stopFeature, "VehicleCollisionOnlyCleanup")
	pcall(stopFeature, "GateBarrierCollisionCleanup")
	pcall(stopFeature, "CarunoNoRecoilCleanup")
	pcall(stopBorderSpeedLimitRemoval)
	pcall(stopInfiniteFuel)
	pcall(stopAntiPit)
	pcall(stopSpeedHack)
	pcall(stopInfiniteStamina)
	for _, connection in ipairs(connections) do
		pcall(function()
			connection:Disconnect()
		end)
	end
	table.clear(connections)
	table.clear(listeners)
	table.clear(localized)
	local removed = false
	if type(Fluent.Destroy) == "function" then
		removed = pcall(function()
			Fluent:Destroy()
		end)
	elseif type(Fluent.Unload) == "function" then
		removed = pcall(function()
			Fluent:Unload()
		end)
	end
	if not removed then
		pcall(function()
			local gui = Fluent.GUI or (Window and Window.Root)
			if typeof(gui) == "Instance" then
				gui:Destroy()
			end
		end)
	end
	if _G.CarunoHubUI == api then
		_G.CarunoHubUI = nil
	end
end
_G.CarunoHubUI = api
local buildFailures = {}
local function safeAdd(label, builder)
	local state = { done = false, ok = false, result = nil }
	task.spawn(function()
		local ok, result = pcall(builder)
		state.ok = ok
		state.result = result
		state.done = true
	end)
	local deadline = os.clock() + 3
	while not state.done and os.clock() < deadline do
		task.wait()
	end
	if not state.done then
		table.insert(buildFailures, label .. " (timed out)")
		warn("[CARUNOHUB] " .. label .. ": timed out while building")
		return nil
	end
	if not state.ok then
		table.insert(buildFailures, label .. ": " .. tostring(state.result))
		warn("[CARUNOHUB] " .. label .. ": " .. tostring(state.result))
		return nil
	end
	print("[CARUNOHUB] built: " .. label)
	return state.result
end
local function register(element, key)
	if element and type(key) == "string" then
		table.insert(localized, { element = element, key = key })
	end
	return element
end
local function relabel()
	if #localized == 0 then
		return false
	end
	for _, entry in ipairs(localized) do
		local element = entry.element
		local setter = element and (element.SetTitle or element.SetName)
		if type(setter) ~= "function" then
			return false
		end
		if not (pcall(setter, element, translate(entry.key))) then
			return false
		end
	end
	return true
end
local function addFeature(tab, key, featureName, startCallback, stopCallback)
	return safeAdd(featureName, function()
		local toggle
		local guard = false
		toggle = tab:AddToggle(key, {
			Title = translate(featureName),
			Description = "",
			Default = false,
			Callback = function(state)
				if guard then
					return
				end
				local success, featureError
				if state then
					success, featureError = startCallback()
				else
					success, featureError = stopCallback()
				end
				if success == false then
					notify(
						translate(featureName),
						featureError == "Executor required"
							and translate("Executor required")
							or tostring(featureError or translate("Failed"))
					)
					guard = true
					pcall(function()
						toggle:SetValue(false)
					end)
					guard = false
					emit("feature", { name = featureName, active = false })
					return
				end
				emit("feature", { name = featureName, active = state })
			end,
		})
		return register(toggle, featureName)
	end)
end
task.spawn(function()
	safeAdd("Language", function()
		local languageValues = { "Russian", "English", "Spanish" }
		local languageIndex = table.find(languageValues, currentLanguage) or 2
		return register(
			Tabs.Settings:AddDropdown("Language", {
				Title = translate("Language"),
				Description = "Applied instantly when possible; the choice is remembered",
				Values = languageValues,
				Multi = false,
				Default = languageIndex,
				Callback = function(language)
					if language == currentLanguage then
						return
					end
					currentLanguage = language
					values.language = language
					_G.CarunoHubLanguage = language
					emit("language", language)
					if relabel() then
						notify(translate("Language"), language)
					else
						notify(
							translate("Language"),
							language .. " saved: re-execute the script to relabel the menu"
						)
					end
				end,
			}),
			"Language"
		)
	end)
	safeAdd("Unload", function()
		return register(
			Tabs.Settings:AddButton({
				Title = translate("Unload"),
				Description = translate("Unload interface"),
				Callback = function()
					api.Destroy()
				end,
			}),
			"Unload"
		)
	end)
	safeAdd("Alt info", function()
		return Tabs.Settings:AddParagraph({
			Title = "Alt",
			Content = "Hold Left/Right Alt: on foot it applies Alt Speed, while driving it applies Vehicle Speed on Alt.",
		})
	end)
	addFeature(Tabs.Player, "NoRecoil", "No Recoil", function()
		return runFeatureSource(NO_RECOIL_SOURCE, "@CARUNOHUB/NoRecoil")
	end, function()
		return stopFeature("CarunoNoRecoilCleanup")
	end)
	addFeature(Tabs.Player, "AltSpeed", "Alt Speed", startSpeedHack, stopSpeedHack)
	addFeature(
		Tabs.Player,
		"InfiniteStamina",
		"Infinite Stamina",
		startInfiniteStamina,
		stopInfiniteStamina
	)
	safeAdd("Alt Speed value", function()
		return register(
			Tabs.Player:AddSlider("AltSpeedValue", {
				Title = translate("Alt Speed"),
				Description = "Walk speed while Alt is held (default game speed is 16)",
				Default = values.altSpeed,
				Min = 24,
				Max = 120,
				Rounding = 0,
				Callback = function(value)
					values.altSpeed = value
					emit("altSpeed", value)
				end,
			}),
			"Alt Speed"
		)
	end)
	addFeature(Tabs.Vehicle, "GateBarrier", "Border Gate Anti-Collision", function()
		return runFeatureSource(GATE_SOURCE, "@CARUNOHUB/GateBarrier")
	end, function()
		return stopFeature("GateBarrierCollisionCleanup")
	end)
	addFeature(Tabs.Vehicle, "PhysicsRam", "Physics Ram", function()
		return runFeatureSource(RAM_SOURCE, "@CARUNOHUB/PhysicsRam")
	end, function()
		return stopFeature("VehiclePhysRamCleanup")
	end)
	addFeature(Tabs.Vehicle, "AntiCollision", "Vehicle Anti-Collision", function()
		return runFeatureSource(COLLISION_SOURCE, "@CARUNOHUB/VehicleAntiCollision")
	end, function()
		return stopFeature("VehicleCollisionOnlyCleanup")
	end)
	addFeature(
		Tabs.Vehicle,
		"BorderSpeedLimit",
		"Remove Border Speed Limit",
		startBorderSpeedLimitRemoval,
		stopBorderSpeedLimitRemoval
	)
	addFeature(Tabs.Vehicle, "InfiniteFuel", "Infinite Fuel", startInfiniteFuel, stopInfiniteFuel)
	addFeature(Tabs.Vehicle, "AntiPit", "Anti PIT", startAntiPit, stopAntiPit)
	addFeature(Tabs.Vehicle, "VehicleSpeedOnAlt", "Vehicle Speed on Alt", function()
		return AC_CONFIG.startVehicleSpeed()
	end, function()
		return AC_CONFIG.stopVehicleSpeed()
	end)
	safeAdd("Vehicle Alt Speed", function()
		return register(
			Tabs.Vehicle:AddSlider("VehicleAltSpeed", {
				Title = translate("Vehicle Alt Speed"),
				Description = "% of stock top speed (100 = off, 200 = AntiTp-safe cap)",
				Default = values.vehicleAltSpeed,
				Min = 100,
				Max = 400,
				Rounding = 0,
				Callback = function(value)
					values.vehicleAltSpeed = value
					emit("vehicleAltSpeed", value)
				end,
			}),
			"Vehicle Alt Speed"
		)
	end)
	safeAdd("Ignore AntiTp safe cap", function()
		return Tabs.Vehicle:AddToggle("VehicleAltRisky", {
			Title = "Ignore AntiTp safe cap",
			Description = "Server budget is maxSpeed * (step + ping) * 2 + 100 studs; above ~2x you get rolled back.",
			Default = false,
			Callback = function(state)
				values.vehicleAltRisky = state
				emit("vehicleAltRisky", state)
			end,
		})
	end)
	safeAdd("Show boost", function()
		return Tabs.Vehicle:AddButton({
			Title = "Show boost for current vehicle",
			Description = "Reads the Gears MaxSpeed attributes of the car you are driving",
			Callback = function()
				local ok, info = pcall(AC_CONFIG.describeBoost)
				notify("Vehicle boost", (ok and info) or "Sit in the driver seat first")
			end,
		})
	end)
	pcall(function()
		Window:SelectTab(1)
	end)
	if #buildFailures > 0 then
		notify("Build report", table.concat(buildFailures, " | "))
	else
		notify("CARUNOHUB v27", "Loaded. Menu: Right Shift, boost: hold Alt")
	end
	if not VehicleUtil then
		notify(
			translate("Vehicle Speed on Alt"),
			"VehicleUtil not found - falling back to Workspace.Vehicles lookup"
		)
	end
end)
return api