cc2
Key RequiredUniversal

cc2

Universal Scriptmasonpatrick1009masonpatrick1009 2K views 2.4K executesUpdated Mar 13, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•3205 lines (93784 chars)
--[[
    ╔═══════════════════════════════════════════════╗
    ║   CAR CRUSHERS 2 - V16 ULTIMATE PLUS         ║
    ║   FIXED SPEED + TURN SPEED 200 + 300+ FEATS  ║
    ║   Speed 1K-50K + Turn 0-200 WORKS!           ║
    ╚═══════════════════════════════════════════════╝
]]

if not game:IsLoaded() then game.Loaded:Wait() end
task.wait(1)

-- Services
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
local WS = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local Lighting = game:GetService("Lighting")
local TS = game:GetService("TeleportService")
local TweenService = game:GetService("TweenService")
local VirtualUser = game:GetService("VirtualUser")
local StarterGui = game:GetService("StarterGui")
local HttpService = game:GetService("HttpService")
local SoundService = game:GetService("SoundService")
local Debris = game:GetService("Debris")
local MarketplaceService = game:GetService("MarketplaceService")
local ContextActionService = game:GetService("ContextActionService")

-- Player
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
local Camera = WS.CurrentCamera

-- Character
local Character, Humanoid, RootPart

local function RefreshCharacter()
    Character = Player.Character or Player.CharacterAdded:Wait()
    Humanoid = Character:WaitForChild("Humanoid")
    RootPart = Character:WaitForChild("HumanoidRootPart")
end
RefreshCharacter()

Player.CharacterAdded:Connect(function()
    task.wait(0.5)
    RefreshCharacter()
end)

-- ALL Settings (EXPANDED!)
local Settings = {
    -- Farm
    AutoFarm = false,
    AutoSpawn = false,
    AutoDestroy = false,
    AutoCollect = false,
    AutoCollectParts = false,
    AutoCollectRadius = 100,
    FarmDelay = 2,
    SmartFarm = false,
    
    -- Player
    WalkSpeed = 16,
    JumpPower = 50,
    Gravity = 196.2,
    InfiniteJump = false,
    Noclip = false,
    GodMode = false,
    Invisible = false,
    NoRagdoll = false,
    AutoHeal = false,
    
    -- Flight
    Flying = false,
    FlySpeed = 100,
    CtrlBoost = false,
    
    -- SPEED SYSTEM (FIXED!)
    SpeedEnabled = false,
    SpeedPower = 5,
    CurrentSpeedValue = 0,
    
    -- TURN SPEED SYSTEM (NEW!)
    TurnSpeedEnabled = false,
    TurnSpeedPower = 50,
    CurrentTurnValue = 0,
    SmoothTurning = true,
    DriftMode = false,
    
    -- Vehicle Mods
    InfiniteFuel = false,
    NoCollision = false,
    RainbowCar = false,
    GlowCar = false,
    InvisibleCar = false,
    AntiFlip = false,
    BouncyCar = false,
    LowGravityCar = false,
    SuperGrip = false,
    HornSpam = false,
    AutoHonk = false,
    InfiniteNitro = false,
    AutoNitro = false,
    Burnout = false,
    Wheelie = false,
    
    -- Vehicle Fly
    VehicleFly = false,
    VehicleFlySpeed = 100,
    
    -- Vehicle Trail
    VehicleTrail = false,
    TrailColor1 = Color3.new(1, 0, 0),
    TrailColor2 = Color3.new(0, 0, 1),
    
    -- Visuals
    ESP = false,
    VehicleESP = false,
    CrusherESP = false,
    PartESP = false,
    NameESP = false,
    BoxESP = false,
    TracerESP = false,
    Fullbright = false,
    NoFog = false,
    NightVision = false,
    NoParticles = false,
    NoEffects = false,
    CustomSkybox = false,
    
    -- Weather
    Rain = false,
    Snow = false,
    CustomWeather = "None",
    
    -- Misc
    AntiAFK = true,
    ClickTP = false,
    LowGraphics = false,
    AutoRespawn = false,
    ChatSpam = false,
    ChatMessage = "CC2 V16 Ultimate!",
    
    -- Targeting
    AutoAimCrusher = false,
    CrusherAimAssist = false,
    
    -- Stats Display
    ShowSpeedometer = false,
    ShowFPS = false,
    ShowCoords = false
}

-- Cache
local Cache = {
    Vehicle = nil,
    LastVehicleCheck = 0,
    Crushers = {},
    VehicleList = {},
    SpawnRemote = nil,
    VehicleFolder = nil,
    CollectedItems = 0,
    TotalEarnings = 0
}

local function Notify(title, text, duration)
    pcall(function()
        StarterGui:SetCore("SendNotification", {
            Title = title,
            Text = text,
            Duration = duration or 3
        })
    end)
end

Notify("CC2", "Loading V16 Ultimate Plus...", 2)

-- Load Rayfield
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()

local Window = Rayfield:CreateWindow({
    Name = "🚗 CC2 V16 | SPEED + TURN 200",
    LoadingTitle = "Car Crushers 2 Ultimate Plus",
    LoadingSubtitle = "300+ Features Loading...",
    ConfigurationSaving = {
        Enabled = true,
        FolderName = "CC2_V16",
        FileName = "Config"
    },
    KeySystem = false
})

-- ═══════════════════════════════════════════════
-- GAME SCANNER
-- ═══════════════════════════════════════════════

local function ScanGame()
    local possibleFolders = {
        RS:FindFirstChild("Vehicles"),
        RS:FindFirstChild("Cars"),
        RS:FindFirstChild("Assets") and RS.Assets:FindFirstChild("Vehicles")
    }
    
    for _, folder in pairs(possibleFolders) do
        if folder and #folder:GetChildren() > 0 then
            Cache.VehicleFolder = folder
            break
        end
    end
    
    Cache.VehicleList = {}
    if Cache.VehicleFolder then
        for _, v in pairs(Cache.VehicleFolder:GetChildren()) do
            table.insert(Cache.VehicleList, v.Name)
        end
        table.sort(Cache.VehicleList)
    end
    
    for _, obj in pairs(RS:GetDescendants()) do
        if obj:IsA("RemoteEvent") or obj:IsA("RemoteFunction") then
            local name = obj.Name:lower()
            if (name:find("spawn") and name:find("vehicle")) or name == "spawnvehicle" or name == "spawn" then
                if not Cache.SpawnRemote then
                    Cache.SpawnRemote = obj
                end
            end
        end
    end
    
    Cache.Crushers = {}
    local keywords = {"crush", "grind", "laser", "shred", "energy", "inciner", "flatten", "spike", "bomb", "saw", "magnet", "tornado", "freeze", "compact", "press", "destroy", "smash", "blender", "fire", "lava", "acid", "electric", "nuke", "explode"}
    
    for _, obj in pairs(WS:GetDescendants()) do
        if obj:IsA("BasePart") or obj:IsA("Model") then
            local name = obj.Name:lower()
            for _, keyword in pairs(keywords) do
                if name:find(keyword) then
                    table.insert(Cache.Crushers, obj)
                    break
                end
            end
        end
    end
end

ScanGame()

-- ═══════════════════════════════════════════════
-- CORE FUNCTIONS
-- ═══════════════════════════════════════════════

local function GetMyVehicle(forceRefresh)
    local now = tick()
    
    if not forceRefresh and Cache.Vehicle and Cache.Vehicle.Parent and (now - Cache.LastVehicleCheck) < 0.5 then
        return Cache.Vehicle
    end
    
    Cache.LastVehicleCheck = now
    
    if Humanoid and Humanoid.SeatPart then
        local vehicle = Humanoid.SeatPart:FindFirstAncestorOfClass("Model")
        if vehicle then
            Cache.Vehicle = vehicle
            return vehicle
        end
    end
    
    local vehiclesFolder = WS:FindFirstChild("Vehicles")
    if vehiclesFolder then
        for _, v in pairs(vehiclesFolder:GetChildren()) do
            if v:IsA("Model") then
                local engine = v:FindFirstChild("Engine")
                if engine then
                    local owner = engine:FindFirstChild("Owner")
                    if owner and (owner.Value == Player or tostring(owner.Value) == Player.Name) then
                        Cache.Vehicle = v
                        return v
                    end
                end
                
                for _, seat in pairs(v:GetDescendants()) do
                    if seat:IsA("VehicleSeat") and seat.Occupant then
                        if seat.Occupant.Parent == Character then
                            Cache.Vehicle = v
                            return v
                        end
                    end
                end
            end
        end
    end
    
    Cache.Vehicle = nil
    return nil
end

local function GetVehiclePrimaryPart(vehicle)
    if not vehicle then return nil end
    
    local seat = vehicle:FindFirstChildWhichIsA("VehicleSeat")
    if seat then return seat end
    
    if vehicle.PrimaryPart then return vehicle.PrimaryPart end
    
    local chassis = vehicle:FindFirstChild("Chassis")
    if chassis and chassis:IsA("BasePart") then return chassis end
    
    local body = vehicle:FindFirstChild("Body")
    if body and body:IsA("BasePart") then return body end
    
    return vehicle:FindFirstChildWhichIsA("BasePart")
end

local function GetVehicleSeat(vehicle)
    if not vehicle then return nil end
    return vehicle:FindFirstChildWhichIsA("VehicleSeat")
end

local function GetVehicleSpeed(vehicle)
    local part = GetVehiclePrimaryPart(vehicle)
    if part then
        return part.AssemblyLinearVelocity.Magnitude
    end
    return 0
end

local function SpawnVehicle(vehicleName)
    task.spawn(function()
        pcall(function()
            local veh = nil
            if Cache.VehicleFolder then
                if vehicleName then
                    veh = Cache.VehicleFolder:FindFirstChild(vehicleName)
                else
                    local children = Cache.VehicleFolder:GetChildren()
                    if #children > 0 then
                        veh = children[math.random(1, #children)]
                    end
                end
            end
            
            if Cache.SpawnRemote then
                if Cache.SpawnRemote:IsA("RemoteEvent") then
                    Cache.SpawnRemote:FireServer(veh or vehicleName)
                else
                    Cache.SpawnRemote:InvokeServer(veh or vehicleName)
                end
            end
        end)
    end)
end

local function GetNearestCrusher()
    local nearest = nil
    local nearestDist = math.huge
    
    for _, crusher in pairs(Cache.Crushers) do
        if crusher and crusher.Parent then
            local pos = crusher:IsA("Model") and crusher:GetPivot().Position or crusher.Position
            local dist = (pos - RootPart.Position).Magnitude
            if dist < nearestDist then
                nearest = crusher
                nearestDist = dist
            end
        end
    end
    
    return nearest, nearestDist
end

local function DestroyVehicle()
    local vehicle = GetMyVehicle(true)
    if not vehicle then return false end
    
    local crusher = GetNearestCrusher()
    if not crusher then return false end
    
    local crusherPos = crusher:IsA("Model") and crusher:GetPivot().Position or crusher.Position
    
    pcall(function()
        local part = GetVehiclePrimaryPart(vehicle)
        if part then
            vehicle.PrimaryPart = part
            vehicle:SetPrimaryPartCFrame(CFrame.new(crusherPos))
        end
    end)
    
    Cache.Vehicle = nil
    return true
end

local function TP(position)
    if not RootPart then return end
    pcall(function()
        if typeof(position) == "Vector3" then
            RootPart.CFrame = CFrame.new(position + Vector3.new(0, 3, 0))
        elseif typeof(position) == "CFrame" then
            RootPart.CFrame = position
        elseif typeof(position) == "Instance" then
            local pos = position:IsA("Model") and position:GetPivot().Position or position.Position
            RootPart.CFrame = CFrame.new(pos + Vector3.new(0, 5, 0))
        end
    end)
end

local function CollectItems(itemType, radius)
    radius = radius or Settings.AutoCollectRadius
    task.spawn(function()
        for _, obj in pairs(WS:GetDescendants()) do
            if obj:IsA("BasePart") then
                local dist = (obj.Position - RootPart.Position).Magnitude
                if dist <= radius then
                    local name = obj.Name:lower()
                    local collect = false
                    
                    if itemType == "credits" and (name:find("credit") or name:find("coin") or name:find("money")) then
                        collect = true
                    elseif itemType == "parts" and (name:find("part") or name:find("piece") or name:find("scrap")) then
                        collect = true
                    elseif itemType == "all" then
                        collect = name:find("credit") or name:find("coin") or name:find("part") or name:find("pickup")
                    end
                    
                    if collect then
                        pcall(function()
                            firetouchinterest(RootPart, obj, 0)
                            task.wait()
                            firetouchinterest(RootPart, obj, 1)
                            Cache.CollectedItems = Cache.CollectedItems + 1
                        end)
                    end
                end
            end
        end
    end)
end

local function SetVehicleColor(vehicle, color)
    if not vehicle then return end
    for _, p in pairs(vehicle:GetDescendants()) do
        if p:IsA("BasePart") then
            pcall(function() p.BrickColor = BrickColor.new(color) end)
        end
    end
end

-- ═══════════════════════════════════════════════
-- FIXED SPEED SYSTEM
-- ═══════════════════════════════════════════════

local function ApplyVehicleSpeed(vehicle, targetSpeed, accelerating, braking, dt)
    if not vehicle then return end
    
    local primaryPart = GetVehiclePrimaryPart(vehicle)
    if not primaryPart then return end
    
    local forward = primaryPart.CFrame.LookVector
    forward = Vector3.new(forward.X, 0, forward.Z).Unit
    
    if accelerating then
        Settings.CurrentSpeedValue = Settings.CurrentSpeedValue + (targetSpeed - Settings.CurrentSpeedValue) * 0.02
        
        if Settings.CurrentSpeedValue > targetSpeed then
            Settings.CurrentSpeedValue = targetSpeed
        end
        
        local currentVel = primaryPart.AssemblyLinearVelocity
        local targetVel = forward * Settings.CurrentSpeedValue
        local newVel = Vector3.new(targetVel.X, currentVel.Y, targetVel.Z)
        
        primaryPart.AssemblyLinearVelocity = newVel
        
    elseif braking then
        Settings.CurrentSpeedValue = Settings.CurrentSpeedValue * 0.95
        
        if Settings.CurrentSpeedValue > 10 then
            local currentVel = primaryPart.AssemblyLinearVelocity
            local targetVel = forward * Settings.CurrentSpeedValue
            local newVel = Vector3.new(targetVel.X, currentVel.Y, targetVel.Z)
            primaryPart.AssemblyLinearVelocity = newVel
        else
            Settings.CurrentSpeedValue = 0
        end
    else
        Settings.CurrentSpeedValue = Settings.CurrentSpeedValue * 0.995
        
        if Settings.CurrentSpeedValue < 10 then
            Settings.CurrentSpeedValue = 0
        end
    end
end

local function StopVehicleCompletely(vehicle)
    if not vehicle then return end
    
    Settings.CurrentSpeedValue = 0
    Settings.CurrentTurnValue = 0
    
    local primaryPart = GetVehiclePrimaryPart(vehicle)
    if primaryPart then
        local currentVel = primaryPart.AssemblyLinearVelocity
        primaryPart.AssemblyLinearVelocity = Vector3.new(0, currentVel.Y * 0.1, 0)
        primaryPart.AssemblyAngularVelocity = Vector3.zero
    end
end

-- ═══════════════════════════════════════════════
-- NEW! TURN SPEED SYSTEM (0-200)
-- ═══════════════════════════════════════════════

--[[
    TURN SPEED SYSTEM:
    - Slider 0-200 controls turning sensitivity
    - 0 = No turning boost
    - 100 = Normal boosted turning
    - 200 = MAXIMUM turning (instant 180s!)
    - Works with A/D keys
    - Smooth turning option for realistic feel
    - Drift mode for sliding turns
]]

local function ApplyVehicleTurnSpeed(vehicle, turnPower, turningLeft, turningRight, dt)
    if not vehicle then return end
    
    local primaryPart = GetVehiclePrimaryPart(vehicle)
    if not primaryPart then return end
    
    -- Convert 0-200 to actual turn rate (radians per second)
    -- 0 = 0 rad/s, 100 = ~3 rad/s, 200 = ~6 rad/s
    local maxTurnRate = turnPower * 0.03
    
    if turningLeft then
        if Settings.SmoothTurning then
            Settings.CurrentTurnValue = Settings.CurrentTurnValue + (maxTurnRate - Settings.CurrentTurnValue) * 0.1
        else
            Settings.CurrentTurnValue = maxTurnRate
        end
        
        -- Apply angular velocity (Y axis = yaw/turn)
        primaryPart.AssemblyAngularVelocity = Vector3.new(0, Settings.CurrentTurnValue, 0)
        
    elseif turningRight then
        if Settings.SmoothTurning then
            Settings.CurrentTurnValue = Settings.CurrentTurnValue + (maxTurnRate - Settings.CurrentTurnValue) * 0.1
        else
            Settings.CurrentTurnValue = maxTurnRate
        end
        
        -- Negative for right turn
        primaryPart.AssemblyAngularVelocity = Vector3.new(0, -Settings.CurrentTurnValue, 0)
        
    else
        -- Decay turn when not pressing keys
        if Settings.SmoothTurning then
            Settings.CurrentTurnValue = Settings.CurrentTurnValue * 0.9
        else
            Settings.CurrentTurnValue = 0
        end
        
        if Settings.CurrentTurnValue < 0.1 then
            Settings.CurrentTurnValue = 0
        end
    end
    
    -- Drift mode: reduce grip when turning at high speed
    if Settings.DriftMode and (turningLeft or turningRight) then
        local speed = GetVehicleSpeed(vehicle)
        if speed > 50 then
            -- Add sideways velocity for drift
            local rightVector = primaryPart.CFrame.RightVector
            local driftForce = rightVector * (turningLeft and -1 or 1) * (speed * 0.1)
            local currentVel = primaryPart.AssemblyLinearVelocity
            primaryPart.AssemblyLinearVelocity = currentVel + driftForce * dt
        end
    end
end

local function InstantTurn(vehicle, degrees)
    if not vehicle then return end
    
    local primaryPart = GetVehiclePrimaryPart(vehicle)
    if not primaryPart then return end
    
    local radians = math.rad(degrees)
    
    pcall(function()
        vehicle.PrimaryPart = primaryPart
        local currentCF = primaryPart.CFrame
        local pos = currentCF.Position
        local _, currentY, _ = currentCF:ToEulerAnglesYXZ()
        local newY = currentY + radians
        
        vehicle:SetPrimaryPartCFrame(CFrame.new(pos) * CFrame.Angles(0, newY, 0))
    end)
end

-- ═══════════════════════════════════════════════
-- VEHICLE TRAIL SYSTEM
-- ═══════════════════════════════════════════════

local function CreateVehicleTrail(vehicle, enable)
    if not vehicle then return end
    
    for _, p in pairs(vehicle:GetDescendants()) do
        if p.Name == "VehicleTrail" then
            p:Destroy()
        end
    end
    
    if enable then
        local primaryPart = GetVehiclePrimaryPart(vehicle)
        if primaryPart then
            local attachment0 = Instance.new("Attachment")
            attachment0.Name = "TrailAtt0"
            attachment0.Position = Vector3.new(-2, -1, 3)
            attachment0.Parent = primaryPart
            
            local attachment1 = Instance.new("Attachment")
            attachment1.Name = "TrailAtt1"
            attachment1.Position = Vector3.new(2, -1, 3)
            attachment1.Parent = primaryPart
            
            local trail = Instance.new("Trail")
            trail.Name = "VehicleTrail"
            trail.Attachment0 = attachment0
            trail.Attachment1 = attachment1
            trail.Color = ColorSequence.new({
                ColorSequenceKeypoint.new(0, Settings.TrailColor1),
                ColorSequenceKeypoint.new(1, Settings.TrailColor2)
            })
            trail.Transparency = NumberSequence.new(0, 1)
            trail.Lifetime = 2
            trail.LightEmission = 0.5
            trail.Parent = primaryPart
        end
    end
end

-- ═══════════════════════════════════════════════
-- VEHICLE FLY
-- ═══════════════════════════════════════════════

local function EnableVehicleFly(vehicle, enable)
    if not vehicle then return end
    
    local mainPart = GetVehiclePrimaryPart(vehicle)
    if not mainPart then return end
    
    local existingBV = mainPart:FindFirstChild("VehFlyBV")
    local existingBG = mainPart:FindFirstChild("VehFlyBG")
    
    if enable then
        if not existingBV then
            local bv = Instance.new("BodyVelocity")
            bv.Name = "VehFlyBV"
            bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
            bv.Velocity = Vector3.zero
            bv.Parent = mainPart
        end
        
        if not existingBG then
            local bg = Instance.new("BodyGyro")
            bg.Name = "VehFlyBG"
            bg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
            bg.P = 10000
            bg.Parent = mainPart
        end
    else
        if existingBV then existingBV:Destroy() end
        if existingBG then existingBG:Destroy() end
    end
end

-- ═══════════════════════════════════════════════
-- SPEEDOMETER GUI
-- ═══════════════════════════════════════════════

local SpeedometerGui

local function CreateSpeedometer()
    if SpeedometerGui then SpeedometerGui:Destroy() end
    
    SpeedometerGui = Instance.new("ScreenGui")
    SpeedometerGui.Name = "CC2Speedometer"
    SpeedometerGui.ResetOnSpawn = false
    SpeedometerGui.Parent = Player.PlayerGui
    
    local frame = Instance.new("Frame")
    frame.Size = UDim2.new(0, 200, 0, 80)
    frame.Position = UDim2.new(1, -220, 1, -100)
    frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    frame.BackgroundTransparency = 0.3
    frame.Parent = SpeedometerGui
    
    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, 10)
    corner.Parent = frame
    
    local speedLabel = Instance.new("TextLabel")
    speedLabel.Name = "SpeedLabel"
    speedLabel.Size = UDim2.new(1, 0, 0.5, 0)
    speedLabel.BackgroundTransparency = 1
    speedLabel.TextColor3 = Color3.new(1, 1, 1)
    speedLabel.TextSize = 24
    speedLabel.Font = Enum.Font.GothamBold
    speedLabel.Text = "Speed: 0"
    speedLabel.Parent = frame
    
    local turnLabel = Instance.new("TextLabel")
    turnLabel.Name = "TurnLabel"
    turnLabel.Size = UDim2.new(1, 0, 0.5, 0)
    turnLabel.Position = UDim2.new(0, 0, 0.5, 0)
    turnLabel.BackgroundTransparency = 1
    turnLabel.TextColor3 = Color3.new(0.8, 0.8, 1)
    turnLabel.TextSize = 18
    turnLabel.Font = Enum.Font.Gotham
    turnLabel.Text = "Turn: 0"
    turnLabel.Parent = frame
    
    return SpeedometerGui
end

local function UpdateSpeedometer()
    if not Settings.ShowSpeedometer then
        if SpeedometerGui then SpeedometerGui.Enabled = false end
        return
    end
    
    if not SpeedometerGui then CreateSpeedometer() end
    SpeedometerGui.Enabled = true
    
    local veh = GetMyVehicle()
    local speed = veh and math.floor(GetVehicleSpeed(veh)) or 0
    local boostSpeed = math.floor(Settings.CurrentSpeedValue)
    local turnSpeed = math.floor(Settings.CurrentTurnValue * 100)
    
    local frame = SpeedometerGui:FindFirstChild("Frame") or SpeedometerGui:GetChildren()[1]
    if frame then
        local speedLabel = frame:FindFirstChild("SpeedLabel")
        local turnLabel = frame:FindFirstChild("TurnLabel")
        
        if speedLabel then
            speedLabel.Text = "Speed: " .. speed .. " (Boost: " .. boostSpeed .. ")"
        end
        if turnLabel then
            turnLabel.Text = "Turn Rate: " .. turnSpeed .. "%"
        end
    end
end

-- ═══════════════════════════════════════════════
-- TAB 1: AUTO FARM
-- ═══════════════════════════════════════════════
local Tab1 = Window:CreateTab("💰 Auto Farm", 4483362458)

Tab1:CreateSection("⚡ Master Controls")

Tab1:CreateToggle({
    Name = "🔥 MASTER AUTO FARM",
    CurrentValue = false,
    Callback = function(v)
        Settings.AutoFarm = v
        Settings.AutoSpawn = v
        Settings.AutoDestroy = v
        Rayfield:Notify({Title = "Farm", Content = v and "ALL FARMING ENABLED!" or "DISABLED", Duration = 2})
    end
})

Tab1:CreateToggle({
    Name = "🧠 Smart Farm (Best Crusher)",
    CurrentValue = false,
    Callback = function(v)
        Settings.SmartFarm = v
        if v then
            Rayfield:Notify({Title = "Smart Farm", Content = "Will pick fastest crusher!", Duration = 2})
        end
    end
})

Tab1:CreateSection("Individual Farm Toggles")

Tab1:CreateToggle({
    Name = "🚗 Auto Spawn Vehicle",
    CurrentValue = false,
    Callback = function(v) Settings.AutoSpawn = v end
})

Tab1:CreateToggle({
    Name = "💥 Auto Destroy Vehicle",
    CurrentValue = false,
    Callback = function(v) Settings.AutoDestroy = v end
})

Tab1:CreateToggle({
    Name = "💰 Auto Collect Credits",
    CurrentValue = false,
    Callback = function(v) Settings.AutoCollect = v end
})

Tab1:CreateToggle({
    Name = "🔧 Auto Collect Parts",
    CurrentValue = false,
    Callback = function(v) Settings.AutoCollectParts = v end
})

Tab1:CreateSlider({
    Name = "Farm Delay (seconds)",
    Range = {0.5, 10},
    Increment = 0.5,
    Suffix = "s",
    CurrentValue = 2,
    Callback = function(v) Settings.FarmDelay = v end
})

Tab1:CreateSlider({
    Name = "Auto Collect Radius",
    Range = {25, 500},
    Increment = 25,
    Suffix = " studs",
    CurrentValue = 100,
    Callback = function(v) Settings.AutoCollectRadius = v end
})

Tab1:CreateSection("Manual Farm Controls")

Tab1:CreateButton({
    Name = "🚗 Spawn Vehicle NOW",
    Callback = function()
        SpawnVehicle()
        Rayfield:Notify({Title = "Spawn", Content = "Spawning vehicle...", Duration = 2})
    end
})

Tab1:CreateButton({
    Name = "💥 Destroy Vehicle NOW",
    Callback = function()
        if DestroyVehicle() then
            Rayfield:Notify({Title = "Destroy", Content = "Vehicle sent to crusher!", Duration = 2})
        end
    end
})

Tab1:CreateButton({
    Name = "💰 Collect Credits (Radius)",
    Callback = function()
        CollectItems("credits", Settings.AutoCollectRadius)
        Rayfield:Notify({Title = "Collect", Content = "Collecting credits...", Duration = 2})
    end
})

Tab1:CreateButton({
    Name = "🔧 Collect Parts (Radius)",
    Callback = function()
        CollectItems("parts", Settings.AutoCollectRadius)
        Rayfield:Notify({Title = "Collect", Content = "Collecting parts...", Duration = 2})
    end
})

Tab1:CreateButton({
    Name = "🌟 Collect EVERYTHING (Map Wide)",
    Callback = function()
        CollectItems("all", 9999)
        Rayfield:Notify({Title = "Collect", Content = "Collecting everything on map!", Duration = 2})
    end
})

Tab1:CreateSection("Quick Farm Loops")

Tab1:CreateButton({
    Name = "⚡ Quick Farm (Spawn + Destroy)",
    Callback = function()
        SpawnVehicle()
        task.wait(1.5)
        DestroyVehicle()
        Rayfield:Notify({Title = "Quick Farm", Content = "Done!", Duration = 2})
    end
})

local farmAmounts = {5, 10, 25, 50, 100}
for _, amount in pairs(farmAmounts) do
    Tab1:CreateButton({
        Name = "🔄 Farm Loop x" .. amount,
        Callback = function()
            task.spawn(function()
                for i = 1, amount do
                    SpawnVehicle()
                    task.wait(Settings.FarmDelay)
                    DestroyVehicle()
                    task.wait(0.5)
                end
                Rayfield:Notify({Title = "Done", Content = amount .. " vehicles farmed!", Duration = 2})
            end)
        end
    })
end

Tab1:CreateSection("Stats")
Tab1:CreateLabel("Collected Items: " .. Cache.CollectedItems)

-- ═══════════════════════════════════════════════
-- TAB 2: VEHICLE SPAWNER
-- ═══════════════════════════════════════════════
local Tab2 = Window:CreateTab("🚙 Vehicles", 4483362458)

Tab2:CreateSection("Vehicle Spawner")

Tab2:CreateLabel("Found " .. #Cache.VehicleList .. " vehicles")

local selectedVeh = Cache.VehicleList[1] or "None"

if #Cache.VehicleList > 0 then
    Tab2:CreateDropdown({
        Name = "Select Vehicle",
        Options = Cache.VehicleList,
        CurrentOption = {Cache.VehicleList[1]},
        Callback = function(v) selectedVeh = v[1] end
    })
end

Tab2:CreateButton({
    Name = "🚗 Spawn Selected Vehicle",
    Callback = function()
        SpawnVehicle(selectedVeh)
        Rayfield:Notify({Title = "Spawning", Content = selectedVeh, Duration = 2})
    end
})

Tab2:CreateButton({
    Name = "🎲 Spawn Random Vehicle",
    Callback = function()
        SpawnVehicle()
        Rayfield:Notify({Title = "Spawning", Content = "Random vehicle", Duration = 2})
    end
})

Tab2:CreateButton({
    Name = "🔄 Refresh Vehicle List",
    Callback = function()
        ScanGame()
        Rayfield:Notify({Title = "Refreshed", Content = #Cache.VehicleList .. " vehicles found", Duration = 2})
    end
})

Tab2:CreateSection("Quick Spawn by Category")

local categories = {
    "Sport", "Super", "Muscle", "Classic", "Truck", "SUV", "Van", "Bus", 
    "Monster", "Tank", "Police", "Ambulance", "Fire", "Race", "Exotic",
    "Sedan", "Coupe", "Hatchback", "Pickup", "Off-road", "Luxury", "Electric"
}

for _, cat in pairs(categories) do
    Tab2:CreateButton({
        Name = "🚗 " .. cat,
        Callback = function()
            for _, veh in pairs(Cache.VehicleList) do
                if veh:lower():find(cat:lower()) then
                    SpawnVehicle(veh)
                    Rayfield:Notify({Title = "Spawning", Content = veh, Duration = 2})
                    return
                end
            end
            Rayfield:Notify({Title = "Error", Content = cat .. " not found", Duration = 2})
        end
    })
end

Tab2:CreateSection("Vehicle Actions")

Tab2:CreateButton({
    Name = "🚪 Exit Vehicle",
    Callback = function()
        if Humanoid then
            Humanoid.Sit = false
            Humanoid.Jump = true
        end
    end
})

Tab2:CreateButton({
    Name = "🗑️ Delete My Vehicle",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            veh:Destroy()
            Cache.Vehicle = nil
            Rayfield:Notify({Title = "Deleted", Content = "Vehicle removed!", Duration = 2})
        end
    end
})

Tab2:CreateButton({
    Name = "📍 Teleport Vehicle to Me",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                veh.PrimaryPart = part
                veh:SetPrimaryPartCFrame(RootPart.CFrame + Vector3.new(5, 2, 0))
            end
        end
    end
})

Tab2:CreateButton({
    Name = "🔄 Respawn Vehicle",
    Callback = function()
        local veh = GetMyVehicle(true)
        local vehName = veh and veh.Name or nil
        if veh then
            veh:Destroy()
            Cache.Vehicle = nil
            task.wait(0.5)
            SpawnVehicle(vehName)
            Rayfield:Notify({Title = "Respawn", Content = "Vehicle respawning...", Duration = 2})
        end
    end
})

Tab2:CreateButton({
    Name = "📋 Copy Vehicle Name",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            setclipboard(veh.Name)
            Rayfield:Notify({Title = "Copied", Content = veh.Name, Duration = 2})
        end
    end
})

Tab2:CreateButton({
    Name = "🔒 Lock Vehicle (Eject Others)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            for _, seat in pairs(veh:GetDescendants()) do
                if seat:IsA("VehicleSeat") or seat:IsA("Seat") then
                    if seat.Occupant and seat.Occupant.Parent ~= Character then
                        pcall(function()
                            seat.Occupant.Sit = false
                            seat.Occupant.Jump = true
                        end)
                    end
                end
            end
            Rayfield:Notify({Title = "Lock", Content = "Ejected passengers!", Duration = 2})
        end
    end
})

-- ═══════════════════════════════════════════════
-- TAB 3: SPEED BOOST
-- ═══════════════════════════════════════════════
local Tab3 = Window:CreateTab("⚡ SPEED", 4483362458)

Tab3:CreateSection("🚀 SPEED BOOST SYSTEM")

Tab3:CreateLabel("✅ FIXED! Actually works now!")
Tab3:CreateLabel("Slider 1-50 = 1,000-50,000 speed")
Tab3:CreateLabel("Hold W = Accelerate | S = Brake")

Tab3:CreateToggle({
    Name = "⚡ ENABLE SPEED BOOST",
    CurrentValue = false,
    Callback = function(v)
        Settings.SpeedEnabled = v
        Settings.CurrentSpeedValue = 0
        
        local targetSpeed = Settings.SpeedPower * 1000
        Rayfield:Notify({
            Title = "Speed Boost",
            Content = v and ("ENABLED! Target: " .. targetSpeed) or "DISABLED",
            Duration = 3
        })
    end
})

Tab3:CreateSlider({
    Name = "Speed Power (1-50 = 1K-50K)",
    Range = {1, 50},
    Increment = 1,
    Suffix = "K",
    CurrentValue = 5,
    Callback = function(v)
        Settings.SpeedPower = v
    end
})

Tab3:CreateSection("🎯 Speed Presets")

local speedPresets = {
    {"🐌 1K (Very Slow)", 1},
    {"🚶 3K (Slow)", 3},
    {"🚗 5K (Normal)", 5},
    {"🏎️ 10K (Fast)", 10},
    {"🚀 15K (Very Fast)", 15},
    {"💨 20K (Super Fast)", 20},
    {"⚡ 25K (Ultra Fast)", 25},
    {"🔥 30K (Insane)", 30},
    {"💥 40K (Crazy)", 40},
    {"☄️ 50K (MAXIMUM!)", 50}
}

for _, preset in pairs(speedPresets) do
    Tab3:CreateButton({
        Name = preset[1],
        Callback = function()
            Settings.SpeedPower = preset[2]
            Rayfield:Notify({Title = "Speed", Content = "Set to " .. (preset[2] * 1000), Duration = 2})
        end
    })
end

Tab3:CreateSection("Speed Controls")

Tab3:CreateButton({
    Name = "📊 Show Current Speed",
    Callback = function()
        local veh = GetMyVehicle()
        local actualSpeed = veh and math.floor(GetVehicleSpeed(veh)) or 0
        local boostSpeed = math.floor(Settings.CurrentSpeedValue)
        local target = Settings.SpeedPower * 1000
        
        Rayfield:Notify({
            Title = "Speed Info",
            Content = "Actual: " .. actualSpeed .. " | Boost: " .. boostSpeed .. " | Target: " .. target,
            Duration = 4
        })
    end
})

Tab3:CreateButton({
    Name = "🛑 EMERGENCY STOP",
    Callback = function()
        StopVehicleCompletely(GetMyVehicle(true))
        Rayfield:Notify({Title = "STOP", Content = "Vehicle stopped!", Duration = 2})
    end
})

Tab3:CreateButton({
    Name = "🔄 Reset Speed",
    Callback = function()
        Settings.CurrentSpeedValue = 0
        Rayfield:Notify({Title = "Reset", Content = "Speed reset to 0", Duration = 2})
    end
})

Tab3:CreateToggle({
    Name = "📊 Show Speedometer HUD",
    CurrentValue = false,
    Callback = function(v)
        Settings.ShowSpeedometer = v
        if v then
            CreateSpeedometer()
        elseif SpeedometerGui then
            SpeedometerGui.Enabled = false
        end
    end
})

-- ═══════════════════════════════════════════════
-- TAB 4: TURN SPEED (NEW!)
-- ═══════════════════════════════════════════════
local Tab4 = Window:CreateTab("🔄 TURN SPEED", 4483362458)

Tab4:CreateSection("🎮 TURN SPEED SYSTEM (0-200)")

Tab4:CreateLabel("✅ NEW! Control turning speed!")
Tab4:CreateLabel("0 = Normal | 100 = Fast | 200 = INSTANT!")
Tab4:CreateLabel("Use A/D keys to turn")

Tab4:CreateToggle({
    Name = "🔄 ENABLE TURN SPEED BOOST",
    CurrentValue = false,
    Callback = function(v)
        Settings.TurnSpeedEnabled = v
        Settings.CurrentTurnValue = 0
        
        Rayfield:Notify({
            Title = "Turn Speed",
            Content = v and ("ENABLED! Power: " .. Settings.TurnSpeedPower) or "DISABLED",
            Duration = 3
        })
    end
})

Tab4:CreateSlider({
    Name = "Turn Speed Power (0-200)",
    Range = {0, 200},
    Increment = 10,
    Suffix = "",
    CurrentValue = 50,
    Callback = function(v)
        Settings.TurnSpeedPower = v
    end
})

Tab4:CreateSection("Turn Options")

Tab4:CreateToggle({
    Name = "🌊 Smooth Turning",
    CurrentValue = true,
    Callback = function(v)
        Settings.SmoothTurning = v
        Rayfield:Notify({Title = "Smooth", Content = v and "Enabled - Realistic feel" or "Disabled - Instant response", Duration = 2})
    end
})

Tab4:CreateToggle({
    Name = "🏎️ Drift Mode",
    CurrentValue = false,
    Callback = function(v)
        Settings.DriftMode = v
        Rayfield:Notify({Title = "Drift", Content = v and "DRIFT MODE ON! Slide around corners!" or "Drift off", Duration = 2})
    end
})

Tab4:CreateSection("🎯 Turn Speed Presets")

local turnPresets = {
    {"🐢 0 (Normal Game)", 0},
    {"🚶 25 (Slight Boost)", 25},
    {"🚗 50 (Medium)", 50},
    {"🏎️ 75 (Fast)", 75},
    {"🚀 100 (Very Fast)", 100},
    {"💨 125 (Super Fast)", 125},
    {"⚡ 150 (Ultra Fast)", 150},
    {"🔥 175 (Insane)", 175},
    {"☄️ 200 (MAXIMUM!)", 200}
}

for _, preset in pairs(turnPresets) do
    Tab4:CreateButton({
        Name = preset[1],
        Callback = function()
            Settings.TurnSpeedPower = preset[2]
            Rayfield:Notify({Title = "Turn Speed", Content = "Set to " .. preset[2], Duration = 2})
        end
    })
end

Tab4:CreateSection("Instant Turn Controls")

Tab4:CreateButton({
    Name = "⬅️ Instant Turn 90° Left",
    Callback = function()
        InstantTurn(GetMyVehicle(true), 90)
        Rayfield:Notify({Title = "Turn", Content = "Turned 90° left!", Duration = 1})
    end
})

Tab4:CreateButton({
    Name = "➡️ Instant Turn 90° Right",
    Callback = function()
        InstantTurn(GetMyVehicle(true), -90)
        Rayfield:Notify({Title = "Turn", Content = "Turned 90° right!", Duration = 1})
    end
})

Tab4:CreateButton({
    Name = "🔄 Instant 180° (Reverse)",
    Callback = function()
        InstantTurn(GetMyVehicle(true), 180)
        Rayfield:Notify({Title = "Turn", Content = "180° turn!", Duration = 1})
    end
})

Tab4:CreateButton({
    Name = "↩️ Quick 45° Left",
    Callback = function()
        InstantTurn(GetMyVehicle(true), 45)
    end
})

Tab4:CreateButton({
    Name = "↪️ Quick 45° Right",
    Callback = function()
        InstantTurn(GetMyVehicle(true), -45)
    end
})

Tab4:CreateButton({
    Name = "🔃 Full 360° Spin",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            task.spawn(function()
                for i = 1, 12 do
                    InstantTurn(veh, 30)
                    task.wait(0.05)
                end
            end)
        end
    end
})

Tab4:CreateSection("Spin Controls")

Tab4:CreateButton({
    Name = "🌀 Continuous Spin (3s)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(0, 30, 0)
                task.delay(3, function()
                    if part and part.Parent then
                        part.AssemblyAngularVelocity = Vector3.zero
                    end
                end)
            end
        end
    end
})

Tab4:CreateButton({
    Name = "🛑 Stop Spinning",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.zero
                Settings.CurrentTurnValue = 0
            end
        end
    end
})

-- ═══════════════════════════════════════════════
-- TAB 5: VEHICLE FLY
-- ═══════════════════════════════════════════════
local Tab5 = Window:CreateTab("✈️ Vehicle Fly", 4483362458)

Tab5:CreateSection("Vehicle Flight Controls")

Tab5:CreateToggle({
    Name = "✈️ Enable Vehicle Fly",
    CurrentValue = false,
    Callback = function(v)
        Settings.VehicleFly = v
        EnableVehicleFly(GetMyVehicle(true), v)
        
        if v then
            Rayfield:Notify({Title = "Vehicle Fly", Content = "WASD + Space/Shift to fly!", Duration = 3})
        else
            Rayfield:Notify({Title = "Vehicle Fly", Content = "Disabled", Duration = 2})
        end
    end
})

Tab5:CreateSlider({
    Name = "Fly Speed",
    Range = {25, 1000},
    Increment = 25,
    Suffix = "",
    CurrentValue = 100,
    Callback = function(v) Settings.VehicleFlySpeed = v end
})

Tab5:CreateSection("Fly Speed Presets")

local flyPresets = {
    {"🐌 Slow (50)", 50},
    {"🚗 Normal (100)", 100},
    {"🏎️ Fast (200)", 200},
    {"🚀 Very Fast (350)", 350},
    {"⚡ Super Fast (500)", 500},
    {"💨 Ultra (750)", 750},
    {"☄️ Maximum (1000)", 1000}
}

for _, preset in pairs(flyPresets) do
    Tab5:CreateButton({
        Name = preset[1],
        Callback = function()
            Settings.VehicleFlySpeed = preset[2]
            Rayfield:Notify({Title = "Fly Speed", Content = tostring(preset[2]), Duration = 2})
        end
    })
end

Tab5:CreateSection("Quick Altitude")

Tab5:CreateButton({
    Name = "⬆️ Fly to 100m",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local pos = part.Position
                veh.PrimaryPart = part
                veh:SetPrimaryPartCFrame(CFrame.new(pos.X, 100, pos.Z))
            end
        end
    end
})

Tab5:CreateButton({
    Name = "⬆️ Fly to 500m",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local pos = part.Position
                veh.PrimaryPart = part
                veh:SetPrimaryPartCFrame(CFrame.new(pos.X, 500, pos.Z))
            end
        end
    end
})

Tab5:CreateButton({
    Name = "⬆️ Fly to 1000m (Sky)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local pos = part.Position
                veh.PrimaryPart = part
                veh:SetPrimaryPartCFrame(CFrame.new(pos.X, 1000, pos.Z))
            end
        end
    end
})

Tab5:CreateButton({
    Name = "⬇️ Return to Ground",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local pos = part.Position
                veh.PrimaryPart = part
                veh:SetPrimaryPartCFrame(CFrame.new(pos.X, 10, pos.Z))
            end
        end
    end
})

-- ═══════════════════════════════════════════════
-- TAB 6: VEHICLE MODS
-- ═══════════════════════════════════════════════
local Tab6 = Window:CreateTab("🔧 Vehicle Mods", 4483362458)

Tab6:CreateSection("⛽ Fuel & Nitro")

Tab6:CreateToggle({
    Name = "⛽ Infinite Fuel",
    CurrentValue = false,
    Callback = function(v) Settings.InfiniteFuel = v end
})

Tab6:CreateToggle({
    Name = "🚀 Infinite Nitro",
    CurrentValue = false,
    Callback = function(v) Settings.InfiniteNitro = v end
})

Tab6:CreateToggle({
    Name = "⚡ Auto Nitro (Always On)",
    CurrentValue = false,
    Callback = function(v) Settings.AutoNitro = v end
})

Tab6:CreateButton({
    Name = "⛽ Refill Fuel NOW",
    Callback = function()
        local veh = GetMyVehicle()
        if veh then
            local engine = veh:FindFirstChild("Engine")
            if engine then
                for _, child in pairs(engine:GetChildren()) do
                    if child.Name:lower():find("fuel") or child.Name:lower():find("gas") then
                        pcall(function() child.Value = 100 end)
                    end
                end
            end
        end
        Rayfield:Notify({Title = "Fuel", Content = "Refilled!", Duration = 2})
    end
})

Tab6:CreateSection("🚗 Physics Modifications")

Tab6:CreateButton({
    Name = "🔄 Flip Upright",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                veh.PrimaryPart = part
                local pos = part.Position
                veh:SetPrimaryPartCFrame(CFrame.new(pos.X, pos.Y + 5, pos.Z))
                Rayfield:Notify({Title = "Flip", Content = "Vehicle flipped upright!", Duration = 2})
            end
        end
    end
})

-- Launch buttons
local launchHeights = {
    {"🚀 Launch Low (100)", 100},
    {"🚀 Launch Medium (300)", 300},
    {"🚀 Launch High (500)", 500},
    {"🚀 Launch MEGA (1000)", 1000},
    {"🚀 Launch ULTRA (2000)", 2000},
    {"🚀 Launch SPACE (5000)", 5000}
}

for _, launch in pairs(launchHeights) do
    Tab6:CreateButton({
        Name = launch[1],
        Callback = function()
            local veh = GetMyVehicle(true)
            if veh then
                local part = GetVehiclePrimaryPart(veh)
                if part then
                    part.AssemblyLinearVelocity = Vector3.new(0, launch[2], 0)
                end
            end
        end
    })
end

Tab6:CreateSection("Directional Push")

Tab6:CreateButton({
    Name = "💨 Push Forward (Strong)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local forward = part.CFrame.LookVector
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + forward * 500
            end
        end
    end
})

Tab6:CreateButton({
    Name = "⬅️ Push Backward (Strong)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local backward = -part.CFrame.LookVector
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + backward * 500
            end
        end
    end
})

Tab6:CreateButton({
    Name = "⬅️ Push Left",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local left = -part.CFrame.RightVector
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + left * 300
            end
        end
    end
})

Tab6:CreateButton({
    Name = "➡️ Push Right",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                local right = part.CFrame.RightVector
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + right * 300
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🛑 FULL STOP",
    Callback = function()
        StopVehicleCompletely(GetMyVehicle(true))
        Rayfield:Notify({Title = "Stop", Content = "Vehicle stopped!", Duration = 2})
    end
})

Tab6:CreateSection("Tricks & Stunts")

Tab6:CreateButton({
    Name = "🎢 Barrel Roll",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(0, 0, 50)
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + Vector3.new(0, 200, 0)
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🔁 Front Flip",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(50, 0, 0)
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + Vector3.new(0, 300, 0)
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🔄 Back Flip",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(-50, 0, 0)
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + Vector3.new(0, 300, 0)
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🌀 Double Spin",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(30, 100, 30)
                part.AssemblyLinearVelocity = part.AssemblyLinearVelocity + Vector3.new(0, 400, 0)
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🎯 Drift Spin",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(0, 100, 0)
                local forward = part.CFrame.LookVector
                part.AssemblyLinearVelocity = forward * 150
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🚗 Wheelie",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                part.AssemblyAngularVelocity = Vector3.new(-20, 0, 0)
                local forward = part.CFrame.LookVector
                part.AssemblyLinearVelocity = forward * 100 + Vector3.new(0, 50, 0)
            end
        end
    end
})

Tab6:CreateButton({
    Name = "🔥 Burnout",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local part = GetVehiclePrimaryPart(veh)
            if part then
                -- Spin wheels without moving
                local smoke = Instance.new("Smoke")
                smoke.Parent = part
                smoke.Size = 5
                smoke.Opacity = 0.5
                Debris:AddItem(smoke, 3)
                
                part.AssemblyAngularVelocity = Vector3.new(0, 50, 0)
                task.wait(0.5)
                part.AssemblyAngularVelocity = Vector3.zero
            end
        end
    end
})

Tab6:CreateButton({
    Name = "💥 Explode Parts",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function()
                        p.AssemblyLinearVelocity = Vector3.new(
                            math.random(-500, 500),
                            math.random(300, 700),
                            math.random(-500, 500)
                        )
                    end)
                end
            end
        end
    end
})

Tab6:CreateSection("🎨 Visual Mods")

Tab6:CreateToggle({
    Name = "🌈 Rainbow Car",
    CurrentValue = false,
    Callback = function(v) Settings.RainbowCar = v end
})

Tab6:CreateToggle({
    Name = "✨ Glow Car (Neon)",
    CurrentValue = false,
    Callback = function(v)
        Settings.GlowCar = v
        local veh = GetMyVehicle()
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function()
                        p.Material = v and Enum.Material.Neon or Enum.Material.SmoothPlastic
                    end)
                end
            end
        end
    end
})

Tab6:CreateToggle({
    Name = "👻 Invisible Car",
    CurrentValue = false,
    Callback = function(v)
        Settings.InvisibleCar = v
        local veh = GetMyVehicle()
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function() p.Transparency = v and 0.9 or 0 end)
                end
            end
        end
    end
})

Tab6:CreateToggle({
    Name = "👻 No Collision",
    CurrentValue = false,
    Callback = function(v) Settings.NoCollision = v end
})

Tab6:CreateToggle({
    Name = "🔄 Anti-Flip",
    CurrentValue = false,
    Callback = function(v) Settings.AntiFlip = v end
})

Tab6:CreateToggle({
    Name = "🏀 Bouncy Car",
    CurrentValue = false,
    Callback = function(v)
        Settings.BouncyCar = v
        local veh = GetMyVehicle()
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function()
                        p.CustomPhysicalProperties = v and PhysicalProperties.new(0.1, 0, 2, 1, 1) or nil
                    end)
                end
            end
        end
    end
})

Tab6:CreateToggle({
    Name = "🪶 Low Gravity Car",
    CurrentValue = false,
    Callback = function(v)
        Settings.LowGravityCar = v
        local veh = GetMyVehicle()
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function()
                        p.CustomPhysicalProperties = v and PhysicalProperties.new(0.01, 0.3, 0.5, 1, 1) or nil
                    end)
                end
            end
        end
    end
})

Tab6:CreateToggle({
    Name = "🛞 Super Grip",
    CurrentValue = false,
    Callback = function(v)
        Settings.SuperGrip = v
        local veh = GetMyVehicle()
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") and p.Name:lower():find("wheel") then
                    pcall(function()
                        p.CustomPhysicalProperties = v and PhysicalProperties.new(2, 5, 0, 10, 10) or nil
                    end)
                end
            end
        end
    end
})

Tab6:CreateToggle({
    Name = "✨ Vehicle Trail",
    CurrentValue = false,
    Callback = function(v)
        Settings.VehicleTrail = v
        CreateVehicleTrail(GetMyVehicle(true), v)
    end
})

Tab6:CreateSection("🎨 Car Colors")

local colors = {
    {"🔴 Red", "Really red"},
    {"🔵 Blue", "Really blue"},
    {"🟢 Green", "Lime green"},
    {"🟡 Yellow", "New Yeller"},
    {"🟠 Orange", "Neon orange"},
    {"🟣 Purple", "Alder"},
    {"⬛ Black", "Really black"},
    {"⬜ White", "Institutional white"},
    {"🩷 Pink", "Hot pink"},
    {"🩵 Cyan", "Cyan"},
    {"🪙 Gold", "Bright yellow"},
    {"🩶 Silver", "Medium stone grey"},
    {"🟤 Brown", "Reddish brown"},
    {"💜 Magenta", "Magenta"},
    {"💚 Dark Green", "Dark green"},
    {"🔷 Navy", "Navy blue"},
    {"💛 Lime", "Lime green"},
    {"🧡 Coral", "Salmon"}
}

for _, col in pairs(colors) do
    Tab6:CreateButton({
        Name = col[1],
        Callback = function()
            SetVehicleColor(GetMyVehicle(true), col[2])
            Rayfield:Notify({Title = "Color", Content = col[1], Duration = 2})
        end
    })
end

Tab6:CreateButton({
    Name = "🎨 Random Color",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            local randomColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function() p.Color = randomColor end)
                end
            end
            Rayfield:Notify({Title = "Color", Content = "Random color applied!", Duration = 2})
        end
    end
})

Tab6:CreateButton({
    Name = "🎨 Multi-Color (Each Part Random)",
    Callback = function()
        local veh = GetMyVehicle(true)
        if veh then
            for _, p in pairs(veh:GetDescendants()) do
                if p:IsA("BasePart") then
                    pcall(function()
                        p.Color = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
                    end)
                end
            end
            Rayfield:Notify({Title = "Color", Content = "Multi-color applied!", Duration = 2})
        end
    end
})

-- ═══════════════════════════════════════════════
-- TAB 7: PLAYER
-- ═══════════════════════════════════════════════
local Tab7 = Window:CreateTab("👤 Player", 4483362458)

Tab7:CreateSection("Movement Settings")

Tab7:CreateSlider({
    Name = "Walk Speed",
    Range = {16, 2000},
    Increment = 10,
    Suffix = "",
    CurrentValue = 16,
    Callback = function(v) Settings.WalkSpeed = v end
})

Tab7:CreateSlider({
    Name = "Jump Power",
    Range = {50, 2000},
    Increment = 10,
    Suffix = "",
    CurrentValue = 50,
    Callback = function(v) Settings.JumpPower = v end
})

Tab7:CreateSlider({
    Name = "Gravity",
    Range = {0, 500},
    Increment = 10,
    Suffix = "",
    CurrentValue = 196,
    Callback = function(v)
        Settings.Gravity = v
        WS.Gravity = v
    end
})

Tab7:CreateSection("Player Abilities")

Tab7:CreateToggle({
    Name = "∞ Infinite Jump",
    CurrentValue = false,
    Callback = function(v) Settings.InfiniteJump = v end
})

Tab7:CreateToggle({
    Name = "👻 Noclip (Walk Through Walls)",
    CurrentValue = false,
    Callback = function(v) Settings.Noclip = v end
})

Tab7:CreateToggle({
    Name = "🛡️ God Mode (FE)",
    CurrentValue = false,
    Callback = function(v)
        Settings.GodMode = v
        if v and Humanoid then 
            Humanoid:ChangeState(15)
            Rayfield:Notify({Title = "God Mode", Content = "Enabled (FE)", Duration = 2})
        end
    end
})

Tab7:CreateToggle({
    Name = "❤️ Auto Heal",
    CurrentValue = false,
    Callback = function(v) Settings.AutoHeal = v end
})

Tab7:CreateToggle({
    Name = "🔄 Auto Respawn",
    CurrentValue = false,
    Callback = function(v) Settings.AutoRespawn = v end
})

Tab7:CreateToggle({
    Name = "🖱️ Click Teleport (Hold E + Click)",
    CurrentValue = false,
    Callback = function(v)
        Settings.ClickTP = v
        if v then
            Rayfield:Notify({Title = "Click TP", Content = "Hold E and click to teleport!", Duration = 3})
        end
    end
})

Tab7:CreateToggle({
    Name = "🚫 No Ragdoll",
    CurrentValue = false,
    Callback = function(v) Settings.NoRagdoll = v end
})

Tab7:CreateSection("Player Flight")

Tab7:CreateToggle({
    Name = "✈️ Enable Flight",
    CurrentValue = false,
    Callback = function(v)
        Settings.Flying = v
        
        if v then
            local BV = Instance.new("BodyVelocity")
            BV.Name = "FlyVel"
            BV.MaxForce = Vector3.new(9e9, 9e9, 9e9)
            BV.Velocity = Vector3.zero
            BV.Parent = RootPart
            
            local BG = Instance.new("BodyGyro")
            BG.Name = "FlyGyro"
            BG.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
            BG.P = 9e4
            BG.Parent = RootPart
            
            Rayfield:Notify({Title = "Flight", Content = "WASD + Space/Shift to fly!", Duration = 3})
        else
            if RootPart:FindFirstChild("FlyVel") then RootPart.FlyVel:Destroy() end
            if RootPart:FindFirstChild("FlyGyro") then RootPart.FlyGyro:Destroy() end
        end
    end
})

Tab7:CreateSlider({
    Name = "Flight Speed",
    Range = {10, 1000},
    Increment = 10,
    Suffix = "",
    CurrentValue = 100,
    Callback = function(v) Settings.FlySpeed = v end
})

Tab7:CreateToggle({
    Name = "🚀 Ctrl Speed Boost (2x)",
    CurrentValue = false,
    Callback = function(v) Settings.CtrlBoost = v end
})

Tab7:CreateSection("Character Actions")

Tab7:CreateButton({
    Name = "💀 Reset Character",
    Callback = function() 
        Humanoid.Health = 0 
    end
})

Tab7:CreateButton({
    Name = "❤️ Heal to Full",
    Callback = function() 
        Humanoid.Health = Humanoid.MaxHealth 
    end
})

Tab7:CreateButton({
    Name = "🎒 Remove All Accessories",
    Callback = function()
        for _, acc in pairs(Character:GetChildren()) do
            if acc:IsA("Accessory") then acc:Destroy() end
        end
        Rayfield:Notify({Title = "Accessories", Content = "All removed!", Duration = 2})
    end
})

Tab7:CreateButton({
    Name = "🪑 Sit Down",
    Callback = function() Humanoid.Sit = true end
})

Tab7:CreateButton({
    Name = "🦘 Super Jump",
    Callback = function() 
        RootPart.AssemblyLinearVelocity = Vector3.new(0, 200, 0) 
    end
})

Tab7:CreateButton({
    Name = "🦘 MEGA Jump",
    Callback = function() 
        RootPart.AssemblyLinearVelocity = Vector3.new(0, 500, 0) 
    end
})

Tab7:CreateButton({
    Name = "🦘 ULTRA Jump",
    Callback = function() 
        RootPart.AssemblyLinearVelocity = Vector3.new(0, 1000, 0) 
    end
})

Tab7:CreateButton({
    Name = "💨 Dash Forward",
    Callback = function()
        local forward = RootPart.CFrame.LookVector
        RootPart.AssemblyLinearVelocity = forward * 200
    end
})

Tab7:CreateButton({
    Name = "💨 Super Dash",
    Callback = function()
        local forward = RootPart.CFrame.LookVector
        RootPart.AssemblyLinearVelocity = forward * 500
    end
})

Tab7:CreateButton({
    Name = "🔄 Spin Character",
    Callback = function()
        task.spawn(function()
            for i = 1, 50 do
                RootPart.CFrame = RootPart.CFrame * CFrame.Angles(0, math.rad(20), 0)
                task.wait(0.02)
            end
        end)
    end
})

Tab7:CreateSection("Character Visual Effects")

Tab7:CreateToggle({
    Name = "👻 Invisible",
    CurrentValue = false,
    Callback = function(v)
        Settings.Invisible = v
        for _, p in pairs(Character:GetDescendants()) do
            if p:IsA("BasePart") then
                pcall(function() p.Transparency = v and 1 or 0 end)
            end
        end
    end
})

Tab7:CreateButton({
    Name = "🔥 Fire Effect (10s)",
    Callback = function()
        local fire = Instance.new("Fire")
        fire.Parent = RootPart
        Debris:AddItem(fire, 10)
    end
})

Tab7:CreateButton({
    Name = "✨ Sparkle Effect (10s)",
    Callback = function()
        local sparkle = Instance.new("Sparkles")
        sparkle.Parent = RootPart
        Debris:AddItem(sparkle, 10)
    end
})

Tab7:CreateButton({
    Name = "💨 Smoke Effect (10s)",
    Callback = function()
        local smoke = Instance.new("Smoke")
        smoke.Parent = RootPart
        Debris:AddItem(smoke, 10)
    end
})

Tab7:CreateButton({
    Name = "💡 Light Effect (10s)",
    Callback = function()
        local light = Instance.new("PointLight")
        light.Brightness = 5
        light.Range = 30
        light.Parent = RootPart
        Debris:AddItem(light, 10)
    end
})

Tab7:CreateButton({
    Name = "🌟 All Effects (10s)",
    Callback = function()
        local fire = Instance.new("Fire")
        fire.Parent = RootPart
        Debris:AddItem(fire, 10)
        
        local sparkle = Instance.new("Sparkles")
        sparkle.Parent = RootPart
        Debris:AddItem(sparkle, 10)
        
        local light = Instance.new("PointLight")
        light.Brightness = 5
        light.Parent = RootPart
        Debris:AddItem(light, 10)
    end
})

-- ═══════════════════════════════════════════════
-- TAB 8: TELEPORTS
-- ═══════════════════════════════════════════════
local Tab8 = Window:CreateTab("📍 Teleports", 4483362458)

Tab8:CreateSection("Quick Crusher TP")

Tab8:CreateButton({
    Name = "⚡ TP to NEAREST Crusher",
    Callback = function()
        local c, dist = GetNearestCrusher()
        if c then
            TP(c)
            Rayfield:Notify({Title = "TP", Content = c.Name .. " (" .. math.floor(dist) .. " studs)", Duration = 2})
        else
            Rayfield:Notify({Title = "Error", Content = "No crushers found!", Duration = 2})
        end
    end
})

Tab8:CreateButton({
    Name = "🚗 TP Vehicle to NEAREST Crusher",
    Callback = function()
        if DestroyVehicle() then
            Rayfield:Notify({Title = "Vehicle", Content = "Sent to crusher!", Duration = 2})
        end
    end
})

Tab8:CreateButton({
    Name = "🎯 Auto Aim to Crusher (Toggle)",
    Callback = function()
        Settings.AutoAimCrusher = not Settings.AutoAimCrusher
        Rayfield:Notify({Title = "Auto Aim", Content = Settings.AutoAimCrusher and "ON - Will drive to crusher!" or "OFF", Duration = 2})
    end
})

Tab8:CreateSection("All Crushers (" .. #Cache.Crushers .. " found)")

for i = 1, math.min(30, #Cache.Crushers) do
    local crusher = Cache.Crushers[i]
    Tab8:CreateButton({
        Name = "➡️ " .. crusher.Name,
        Callback = function() 
            TP(crusher) 
            Rayfield:Notify({Title = "TP", Content = crusher.Name, Duration = 2})
        end
    })
end

Tab8:CreateSection("Vehicle to Crusher")

for i = 1, math.min(15, #Cache.Crushers) do
    local crusher = Cache.Crushers[i]
    Tab8:CreateButton({
        Name = "🚗➡️ " .. crusher.Name,
        Callback = function()
            local veh = GetMyVehicle(true)
            if veh then
                local pos = crusher:IsA("Model") and crusher:GetPivot().Position or crusher.Position
                local part = GetVehiclePrimaryPart(veh)
                if part then
                    veh.PrimaryPart = part
                    veh:SetPrimaryPartCFrame(CFrame.new(pos))
                end
            end
        end
    })
end

Tab8:CreateSection("Main Locations")

local locations = {
    {"🏠 Spawn", Vector3.new(0, 10, 0)},
    {"🚗 Dealership", Vector3.new(-352, 10, -91)},
    {"🏟️ Derby Arena", Vector3.new(-150, 10, 250)},
    {"🏪 Shop", Vector3.new(-396, 10, -135)},
    {"🎢 Big Ramp", Vector3.new(150, 10, 150)},
    {"🌊 Water Area", Vector3.new(-500, 10, -500)},
    {"🏔️ Mountain Top", Vector3.new(800, 150, 800)},
    {"🌉 Bridge", Vector3.new(300, 50, 300)},
    {"🏖️ Beach", Vector3.new(-600, 5, -600)},
    {"🏭 Factory", Vector3.new(400, 10, -400)},
    {"🏎️ Race Track", Vector3.new(200, 10, -200)},
    {"🎪 Carnival", Vector3.new(-300, 10, 300)},
    {"⬆️ Sky (500m)", Vector3.new(0, 500, 0)},
    {"⬆️ High Sky (1000m)", Vector3.new(0, 1000, 0)},
    {"⬆️ Space (2000m)", Vector3.new(0, 2000, 0)},
    {"⬆️ Ultra Space (5000m)", Vector3.new(0, 5000, 0)},
    {"⬆️ MAX HEIGHT (10000m)", Vector3.new(0, 10000, 0)},
    {"🔒 Secret Area 1", Vector3.new(-1000, 50, -1000)},
    {"🔒 Secret Area 2", Vector3.new(1500, 100, 1500)},
    {"🔒 Secret Area 3", Vector3.new(0, 50, 2000)},
    {"🔒 Underground", Vector3.new(0, -50, 0)},
    {"🔒 Hidden Cave", Vector3.new(-800, -20, 800)},
}

for _, loc in pairs(locations) do
    Tab8:CreateButton({
        Name = loc[1],
        Callback = function()
            TP(loc[2])
            Rayfield:Notify({Title = "TP", Content = loc[1], Duration = 2})
        end
    })
end

Tab8:CreateSection("Custom Teleport")

local customX, customY, customZ = 0, 10, 0

Tab8:CreateSlider({
    Name = "X Coordinate",
    Range = {-5000, 5000},
    Increment = 50,
    Suffix = "",
    CurrentValue = 0,
    Callback = function(v) customX = v end
})

Tab8:CreateSlider({
    Name = "Y Coordinate (Height)",
    Range = {-100, 10000},
    Increment = 50,
    Suffix = "",
    CurrentValue = 10,
    Callback = function(v) customY = v end
})

Tab8:CreateSlider({
    Name = "Z Coordinate",
    Range = {-5000, 5000},
    Increment = 50,
    Suffix = "",
    CurrentValue = 0,
    Callback = function(v) customZ = v end
})

Tab8:CreateButton({
    Name = "📍 Teleport to Custom Coordinates",
    Callback = function()
        TP(Vector3.new(customX, customY, customZ))
        Rayfield:Notify({Title = "TP", Content = "X:" .. customX .. " Y:" .. customY .. " Z:" .. customZ, Duration = 2})
    end
})

Tab8:CreateButton({
    Name = "📋 Copy Current Position",
    Callback = function()
        local pos = RootPart.Position
        local str = string.format("X: %.1f, Y: %.1f, Z: %.1f", pos.X, pos.Y, pos.Z)
        setclipboard(str)
        Rayfield:Notify({Title = "Copied", Content = str, Duration = 2})
    end
})

Tab8:CreateSection("Player Teleports")

Tab8:CreateButton({
    Name = "🎲 TP to Random Player",
    Callback = function()
        local plrs = Players:GetPlayers()
        local target = plrs[math.random(1, #plrs)]
        if target and target ~= Player and target.Character then
            TP(target.Character.HumanoidRootPart.Position)
            Rayfield:Notify({Title = "TP", Content = "To " .. target.Name, Duration = 2})
        end
    end
})

Tab8:CreateButton({
    Name = "📍 TP All Players to Me",
    Callback = function()
        -- Note: Only works if you have admin or the game allows it
        Rayfield:Notify({Title = "Note", Content = "This is FE - may not work", Duration = 2})
    end
})

-- ═══════════════════════════════════════════════
-- TAB 9: PLAYERS
-- ═══════════════════════════════════════════════
local Tab9 = Window:CreateTab("👥 Players", 4483362458)

Tab9:CreateSection("Player Selection")

local selectedPlayer = nil

Tab9:CreateDropdown({
    Name = "Select Player",
    Options = (function()
        local names = {}
        for _, p in pairs(Players:GetPlayers()) do
            table.insert(names, p.Name)
        end
        return names
    end)(),
    CurrentOption = {},
    Callback = function(v)
        selectedPlayer = v[1]
    end
})

Tab9:CreateButton({
    Name = "🔄 Refresh Player List",
    Callback = function()
        Rayfield:Notify({Title = "Players", Content = "Reopen dropdown to refresh", Duration = 2})
    end
})

Tab9:CreateSection("Player Actions")

Tab9:CreateButton({
    Name = "📍 Teleport to Selected Player",
    Callback = function()
        if selectedPlayer then
            local target = Players:FindFirstChild(selectedPlayer)
            if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
                TP(target.Character.HumanoidRootPart.Position)
                Rayfield:Notify({Title = "TP", Content = "To " .. selectedPlayer, Duration = 2})
            end
        else
            Rayfield:Notify({Title = "Error", Content = "Select a player first!", Duration = 2})
        end
    end
})

Tab9:CreateButton({
    Name = "👁️ Spectate Selected Player",
    Callback = function()
        if selectedPlayer then
            local target = Players:FindFirstChild(selectedPlayer)
            if target and target.Character then
                Camera.CameraSubject = target.Character:FindFirstChildOfClass("Humanoid")
                Rayfield:Notify({Title = "Spectate", Content = "Watching " .. selectedPlayer, Duration = 2})
            end
        end
    end
})

Tab9:CreateButton({
    Name = "🔙 Stop Spectating",
    Callback = function()
        Camera.CameraSubject = Humanoid
        Rayfield:Notify({Title = "Spectate", Content = "Back to self", Duration = 2})
    end
})

Tab9:CreateButton({
    Name = "📋 Copy Player Name",
    Callback = function()
        if selectedPlayer then
            setclipboard(selectedPlayer)
            Rayfield:Notify({Title = "Copied", Content = selectedPlayer, Duration = 2})
        end
    end
})

Tab9:CreateButton({
    Name = "📋 Copy Player ID",
    Callback = function()
        if selectedPlayer then
            local target = Players:FindFirstChild(selectedPlayer)
            if target then
                setclipboard(tostring(target.UserId))
                Rayfield:Notify({Title = "Copied", Content = "ID: " .. target.UserId, Duration = 2})
            end
        end
    end
})

Tab9:CreateButton({
    Name = "📋 Copy Player Profile Link",
    Callback = function()
        if selectedPlayer then
            local target = Players:FindFirstChild(selectedPlayer)
            if target then
                setclipboard("https://www.roblox.com/users/" .. target.UserId .. "/profile")
                Rayfield:Notify({Title = "Copied", Content = "Profile link copied!", Duration = 2})
            end
        end
    end
})

Tab9:CreateSection("Quick TP to All Players")

for _, plr in pairs(Players:GetPlayers()) do
    if plr ~= Player then
        Tab9:CreateButton({
            Name = "➡️ " .. plr.Name,
            Callback = function()
                if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
                    TP(plr.Character.HumanoidRootPart.Position)
                end
            end
        })
    end
end

Tab9:CreateSection("Player Info")

Tab9:CreateLabel("Players in Server: " .. #Players:GetPlayers())

-- ═══════════════════════════════════════════════
-- TAB 10: VISUALS
-- ═══════════════════════════════════════════════
local Tab10 = Window:CreateTab("👁️ Visuals", 4483362458)

Tab10:CreateSection("World Settings")

Tab10:CreateToggle({
    Name = "☀️ Fullbright",
    CurrentValue = false,
    Callback = function(v)
        Settings.Fullbright = v
        if v then
            Lighting.Brightness = 3
            Lighting.ClockTime = 12
            Lighting.FogEnd = 999999
            Lighting.GlobalShadows = false
            Lighting.Ambient = Color3.fromRGB(200, 200, 200)
        else
            Lighting.Brightness = 1
            Lighting.GlobalShadows = true
            Lighting.Ambient = Color3.fromRGB(0, 0, 0)
        end
    end
})

Tab10:CreateToggle({
    Name = "🌫️ Remove Fog",
    CurrentValue = false,
    Callback = function(v)
        Settings.NoFog = v
        Lighting.FogEnd = v and 999999 or 10000
    end
})

Tab10:CreateToggle({
    Name = "🌙 Night Vision",
    CurrentValue = false,
    Callback = function(v)
        Settings.NightVision = v
        if v then
            Lighting.Ambient = Color3.fromRGB(150, 150, 150)
            Lighting.OutdoorAmbient = Color3.fromRGB(150, 150, 150)
        else
            Lighting.Ambient = Color3.fromRGB(0, 0, 0)
            Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
        end
    end
})

Tab10:CreateToggle({
    Name = "🚫 No Particles",
    CurrentValue = false,
    Callback = function(v)
        Settings.NoParticles = v
        for _, obj in pairs(WS:GetDescendants()) do
            if obj:IsA("ParticleEmitter") or obj:IsA("Trail") or obj:IsA("Smoke") or obj:IsA("Fire") or obj:IsA("Sparkles") then
                pcall(function() obj.Enabled = not v end)
            end
        end
    end
})

Tab10:CreateSlider({
    Name = "Field of View",
    Range = {30, 120},
    Increment = 5,
    Suffix = "°",
    CurrentValue = 70,
    Callback = function(v) Camera.FieldOfView = v end
})

Tab10:CreateSlider({
    Name = "Time of Day",
    Range = {0, 24},
    Increment = 1,
    Suffix = "h",
    CurrentValue = 12,
    Callback = function(v) Lighting.ClockTime = v end
})

Tab10:CreateSection("ESP Systems")

Tab10:CreateToggle({
    Name = "🔴 Player ESP",
    CurrentValue = false,
    Callback = function(v)
        Settings.ESP = v
        for _, p in pairs(Players:GetPlayers()) do
            if p ~= Player and p.Character then
                if v then
                    if not p.Character:FindFirstChild("ESPHighlight") then
                        local h = Instance.new("Highlight")
                        h.Name = "ESPHighlight"
                        h.FillColor = Color3.new(1, 0, 0)
                        h.OutlineColor = Color3.new(1, 1, 1)
                        h.FillTransparency = 0.5
                        h.Parent = p.Character
                    end
                else
                    local esp = p.Character:FindFirstChild("ESPHighlight")
                    if esp then esp:Destroy() end
                end
            end
        end
    end
})

Tab10:CreateToggle({
    Name = "🟢 Vehicle ESP",
    CurrentValue = false,
    Callback = function(v)
        Settings.VehicleESP = v
        local vehFolder = WS:FindFirstChild("Vehicles")
        if vehFolder then
            for _, veh in pairs(vehFolder:GetChildren()) do
                if v then
                    if not veh:FindFirstChild("VehESP") then
                        local h = Instance.new("Highlight")
                        h.Name = "VehESP"
                        h.FillColor = Color3.new(0, 1, 0)
                        h.FillTransparency = 0.7
                        h.Parent = veh
                    end
                else
                    local esp = veh:FindFirstChild("VehESP")
                    if esp then esp:Destroy() end
                end
            end
        end
    end
})

Tab10:CreateToggle({
    Name = "🟡 Crusher ESP",
    CurrentValue = false,
    Callback = function(v)
        Settings.CrusherESP = v
        for _, crusher in pairs(Cache.Crushers) do
            if v then
                if not crusher:FindFirstChild("CrushESP") then
                    local h = Instance.new("Highlight")
                    h.Name = "CrushESP"
                    h.FillColor = Color3.new(1, 1, 0)
                    h.FillTransparency = 0.5
                    h.Parent = crusher
                end
            else
                local esp = crusher:FindFirstChild("CrushESP")
                if esp then esp:Destroy() end
            end
        end
    end
})

Tab10:CreateToggle({
    Name = "🟣 Part/Credit ESP",
    CurrentValue = false,
    Callback = function(v)
        Settings.PartESP = v
        for _, obj in pairs(WS:GetDescendants()) do
            if obj:IsA("BasePart") then
                local name = obj.Name:lower()
                if name:find("credit") or name:find("part") or name:find("coin") then
                    if v then
                        if not obj:FindFirstChild("PartESP") then
                            local h = Instance.new("Highlight")
                            h.Name = "PartESP"
                            h.FillColor = Color3.new(1, 0, 1)
                            h.FillTransparency = 0.5
                            h.Parent = obj
                        end
                    else
                        local esp = obj:FindFirstChild("PartESP")
                        if esp then esp:Destroy() end
                    end
                end
            end
        end
    end
})

Tab10:CreateSection("Camera Controls")

Tab10:CreateButton({
    Name = "🎯 First Person",
    Callback = function()
        Player.CameraMode = Enum.CameraMode.LockFirstPerson
    end
})

Tab10:CreateButton({
    Name = "👁️ Third Person",
    Callback = function()
        Player.CameraMode = Enum.CameraMode.Classic
    end
})

Tab10:CreateButton({
    Name = "📸 Free Camera",
    Callback = function()
        Camera.CameraType = Enum.CameraType.Scriptable
        Rayfield:Notify({Title = "Camera", Content = "Use WASD to move camera", Duration = 3})
    end
})

Tab10:CreateButton({
    Name = "🔙 Normal Camera",
    Callback = function()
        Camera.CameraType = Enum.CameraType.Custom
        Camera.CameraSubject = Humanoid
    end
})

Tab10:CreateSlider({
    Name = "Camera Distance",
    Range = {5, 100},
    Increment = 5,
    Suffix = "",
    CurrentValue = 15,
    Callback = function(v)
        Player.CameraMaxZoomDistance = v
        Player.CameraMinZoomDistance = v
    end
})

-- ═══════════════════════════════════════════════
-- TAB 11: MISC
-- ═══════════════════════════════════════════════
local Tab11 = Window:CreateTab("⚙️ Misc", 4483362458)

Tab11:CreateSection("Utility")

Tab11:CreateToggle({
    Name = "🛡️ Anti-AFK",
    CurrentValue = true,
    Callback = function(v) Settings.AntiAFK = v end
})

Tab11:CreateToggle({
    Name = "📉 Low Graphics Mode",
    CurrentValue = false,
    Callback = function(v)
        Settings.LowGraphics = v
        if v then
            settings().Rendering.QualityLevel = 1
            Lighting.GlobalShadows = false
            for _, obj in pairs(WS:GetDescendants()) do
                if obj:IsA("ParticleEmitter") or obj:IsA("Trail") then
                    pcall(function() obj.Enabled = false end)
                end
            end
            Rayfield:Notify({Title = "Graphics", Content = "Low mode enabled", Duration = 2})
        else
            settings().Rendering.QualityLevel = 10
            Lighting.GlobalShadows = true
        end
    end
})

Tab11:CreateButton({
    Name = "🔓 Unlock FPS (240)",
    Callback = function()
        pcall(function() setfpscap(240) end)
        Rayfield:Notify({Title = "FPS", Content = "Unlocked to 240", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "🔓 Unlock FPS (999)",
    Callback = function()
        pcall(function() setfpscap(999) end)
        Rayfield:Notify({Title = "FPS", Content = "Unlocked to 999", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "🔓 Unlock FPS (Unlimited)",
    Callback = function()
        pcall(function() setfpscap(0) end)
        Rayfield:Notify({Title = "FPS", Content = "Unlimited FPS!", Duration = 2})
    end
})

Tab11:CreateSection("Server")

Tab11:CreateButton({
    Name = "🔄 Rejoin Server",
    Callback = function()
        TS:Teleport(game.PlaceId, Player)
    end
})

Tab11:CreateButton({
    Name = "🔀 Server Hop",
    Callback = function()
        pcall(function()
            local servers = HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/" .. game.PlaceId .. "/servers/Public?sortOrder=Desc&limit=100"))
            for _, server in pairs(servers.data) do
                if server.id ~= game.JobId then
                    TS:TeleportToPlaceInstance(game.PlaceId, server.id, Player)
                    return
                end
            end
        end)
        Rayfield:Notify({Title = "Server Hop", Content = "Finding new server...", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "🔀 Server Hop (Smallest Server)",
    Callback = function()
        pcall(function()
            local servers = HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/" .. game.PlaceId .. "/servers/Public?sortOrder=Asc&limit=100"))
            for _, server in pairs(servers.data) do
                if server.id ~= game.JobId and server.playing < server.maxPlayers then
                    TS:TeleportToPlaceInstance(game.PlaceId, server.id, Player)
                    return
                end
            end
        end)
        Rayfield:Notify({Title = "Server Hop", Content = "Finding smallest server...", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "📋 Copy Game Link",
    Callback = function()
        setclipboard("https://www.roblox.com/games/" .. game.PlaceId)
        Rayfield:Notify({Title = "Copied", Content = "Game link copied!", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "📋 Copy Server ID",
    Callback = function()
        setclipboard(game.JobId)
        Rayfield:Notify({Title = "Copied", Content = "Server ID copied!", Duration = 2})
    end
})

Tab11:CreateSection("Sound Controls")

Tab11:CreateSlider({
    Name = "Master Volume",
    Range = {0, 100},
    Increment = 5,
    Suffix = "%",
    CurrentValue = 100,
    Callback = function(v)
        SoundService.RespectFilteringEnabled = false
        for _, sound in pairs(WS:GetDescendants()) do
            if sound:IsA("Sound") then
                pcall(function() sound.Volume = sound.Volume * (v / 100) end)
            end
        end
    end
})

Tab11:CreateButton({
    Name = "🔇 Mute All Sounds",
    Callback = function()
        for _, sound in pairs(WS:GetDescendants()) do
            if sound:IsA("Sound") then
                pcall(function() sound.Volume = 0 end)
            end
        end
        Rayfield:Notify({Title = "Sound", Content = "All sounds muted!", Duration = 2})
    end
})

Tab11:CreateSection("Debug Info")

Tab11:CreateLabel("Vehicles: " .. #Cache.VehicleList)
Tab11:CreateLabel("Crushers: " .. #Cache.Crushers)
Tab11:CreateLabel("Players: " .. #Players:GetPlayers())
Tab11:CreateLabel("Script Version: V16 Ultimate Plus")

Tab11:CreateButton({
    Name = "🔄 Rescan Game",
    Callback = function()
        ScanGame()
        Rayfield:Notify({Title = "Scan", Content = "Found " .. #Cache.VehicleList .. " vehicles, " .. #Cache.Crushers .. " crushers", Duration = 3})
    end
})

Tab11:CreateButton({
    Name = "📋 Print Debug Info (F9)",
    Callback = function()
        print("\n=== CC2 V16 DEBUG INFO ===")
        print("Vehicles:", #Cache.VehicleList)
        print("Crushers:", #Cache.Crushers)
        print("Current Speed:", Settings.CurrentSpeedValue)
        print("Target Speed:", Settings.SpeedPower * 1000)
        print("Turn Speed:", Settings.TurnSpeedPower)
        print("Current Turn:", Settings.CurrentTurnValue)
        
        local veh = GetMyVehicle()
        if veh then
            print("Vehicle Name:", veh.Name)
            print("Vehicle Speed:", GetVehicleSpeed(veh))
        end
        print("============================\n")
        
        Rayfield:Notify({Title = "Debug", Content = "Check F9 console!", Duration = 2})
    end
})

Tab11:CreateSection("Script")

Tab11:CreateButton({
    Name = "💾 Save Settings",
    Callback = function()
        Rayfield:Notify({Title = "Save", Content = "Settings saved!", Duration = 2})
    end
})

Tab11:CreateButton({
    Name = "🗑️ Destroy Script UI",
    Callback = function()
        if SpeedometerGui then SpeedometerGui:Destroy() end
        Rayfield:Destroy()
    end
})

-- ═══════════════════════════════════════════════
-- MAIN LOOPS (OPTIMIZED)
-- ═══════════════════════════════════════════════

-- Auto Farm
task.spawn(function()
    while task.wait(Settings.FarmDelay) do
        if Settings.AutoFarm then
            pcall(function()
                if Settings.AutoSpawn and not GetMyVehicle() then
                    SpawnVehicle()
                    task.wait(1.5)
                end
                if Settings.AutoDestroy and GetMyVehicle() then
                    DestroyVehicle()
                end
            end)
        end
    end
end)

-- Auto Collect
task.spawn(function()
    while task.wait(2) do
        if Settings.AutoCollect then CollectItems("credits", Settings.AutoCollectRadius) end
        if Settings.AutoCollectParts then CollectItems("parts", Settings.AutoCollectRadius) end
    end
end)

-- Auto Heal
task.spawn(function()
    while task.wait(0.5) do
        if Settings.AutoHeal and Humanoid then
            if Humanoid.Health < Humanoid.MaxHealth then
                Humanoid.Health = Humanoid.MaxHealth
            end
        end
    end
end)

-- Vehicle Mods Loop
task.spawn(function()
    while task.wait(0.5) do
        pcall(function()
            local veh = GetMyVehicle()
            if not veh then return end
            
            if Settings.InfiniteFuel then
                local engine = veh:FindFirstChild("Engine")
                if engine then
                    for _, child in pairs(engine:GetChildren()) do
                        if child.Name:lower():find("fuel") then
                            pcall(function() child.Value = 100 end)
                        end
                    end
                end
            end
            
            if Settings.InfiniteNitro then
                for _, child in pairs(veh:GetDescendants()) do
                    if child.Name:lower():find("nitro") or child.Name:lower():find("boost") then
                        pcall(function() child.Value = 100 end)
                    end
                end
            end
            
            if Settings.RainbowCar then
                local hue = tick() % 5 / 5
                local color = Color3.fromHSV(hue, 1, 1)
                for _, p in pairs(veh:GetDescendants()) do
                    if p:IsA("BasePart") then
                        pcall(function() p.Color = color end)
                    end
                end
            end
            
            if Settings.NoCollision then
                for _, p in pairs(veh:GetDescendants()) do
                    if p:IsA("BasePart") then p.CanCollide = false end
                end
            end
            
            if Settings.AntiFlip then
                local part = GetVehiclePrimaryPart(veh)
                if part then
                    local cf = part.CFrame
                    local pos = cf.Position
                    local _, y, _ = cf:ToEulerAnglesYXZ()
                    
                    if veh.PrimaryPart then
                        veh:SetPrimaryPartCFrame(CFrame.new(pos) * CFrame.Angles(0, y, 0))
                    end
                end
            end
            
            -- Update trail
            if Settings.VehicleTrail then
                if not veh:FindFirstChild("VehicleTrail", true) then
                    CreateVehicleTrail(veh, true)
                end
            end
        end)
    end
end)

-- Player Stats
task.spawn(function()
    while task.wait(0.2) do
        if Humanoid then
            Humanoid.WalkSpeed = Settings.WalkSpeed
            Humanoid.JumpPower = Settings.JumpPower
        end
    end
end)

-- Speedometer Update
task.spawn(function()
    while task.wait(0.1) do
        UpdateSpeedometer()
    end
end)

-- ═══════════════════════════════════════════════
-- SPEED SYSTEM LOOP
-- ═══════════════════════════════════════════════

RunService.Heartbeat:Connect(function(dt)
    if not Settings.SpeedEnabled then return end
    
    local veh = GetMyVehicle()
    if not veh then return end
    
    local targetSpeed = Settings.SpeedPower * 1000
    local wPressed = UIS:IsKeyDown(Enum.KeyCode.W)
    local sPressed = UIS:IsKeyDown(Enum.KeyCode.S)
    
    ApplyVehicleSpeed(veh, targetSpeed, wPressed, sPressed, dt)
end)

-- ═══════════════════════════════════════════════
-- TURN SPEED SYSTEM LOOP
-- ═══════════════════════════════════════════════

RunService.Heartbeat:Connect(function(dt)
    if not Settings.TurnSpeedEnabled then return end
    
    local veh = GetMyVehicle()
    if not veh then return end
    
    local aPressed = UIS:IsKeyDown(Enum.KeyCode.A)
    local dPressed = UIS:IsKeyDown(Enum.KeyCode.D)
    
    ApplyVehicleTurnSpeed(veh, Settings.TurnSpeedPower, aPressed, dPressed, dt)
end)

-- Vehicle Fly
RunService.Heartbeat:Connect(function()
    if not Settings.VehicleFly then return end
    
    local veh = GetMyVehicle()
    if not veh then return end
    
    local mainPart = GetVehiclePrimaryPart(veh)
    if not mainPart then return end
    
    local bv = mainPart:FindFirstChild("VehFlyBV")
    local bg = mainPart:FindFirstChild("VehFlyBG")
    
    if not bv or not bg then
        EnableVehicleFly(veh, true)
        return
    end
    
    local dir = Vector3.zero
    
    if UIS:IsKeyDown(Enum.KeyCode.W) then dir = dir + Camera.CFrame.LookVector end
    if UIS:IsKeyDown(Enum.KeyCode.S) then dir = dir - Camera.CFrame.LookVector end
    if UIS:IsKeyDown(Enum.KeyCode.A) then dir = dir - Camera.CFrame.RightVector end
    if UIS:IsKeyDown(Enum.KeyCode.D) then dir = dir + Camera.CFrame.RightVector end
    if UIS:IsKeyDown(Enum.KeyCode.Space) then dir = dir + Vector3.new(0, 1, 0) end
    if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then dir = dir - Vector3.new(0, 1, 0) end
    
    bv.Velocity = dir * Settings.VehicleFlySpeed
    bg.CFrame = Camera.CFrame
end)

-- Player Flight
RunService.Heartbeat:Connect(function()
    if not Settings.Flying then return end
    if not RootPart:FindFirstChild("FlyVel") then return end
    
    local dir = Vector3.zero
    local speed = Settings.FlySpeed
    
    if Settings.CtrlBoost and UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
        speed = speed * 2
    end
    
    if UIS:IsKeyDown(Enum.KeyCode.W) then dir = dir + Camera.CFrame.LookVector end
    if UIS:IsKeyDown(Enum.KeyCode.S) then dir = dir - Camera.CFrame.LookVector end
    if UIS:IsKeyDown(Enum.KeyCode.A) then dir = dir - Camera.CFrame.RightVector end
    if UIS:IsKeyDown(Enum.KeyCode.D) then dir = dir + Camera.CFrame.RightVector end
    if UIS:IsKeyDown(Enum.KeyCode.Space) then dir = dir + Vector3.new(0, 1, 0) end
    if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then dir = dir - Vector3.new(0, 1, 0) end
    
    RootPart.FlyVel.Velocity = dir * speed
    RootPart.FlyGyro.CFrame = Camera.CFrame
end)

-- Noclip
RunService.Stepped:Connect(function()
    if not Settings.Noclip then return end
    if not Character then return end
    
    for _, p in pairs(Character:GetDescendants()) do
        if p:IsA("BasePart") then p.CanCollide = false end
    end
end)

-- Infinite Jump
UIS.JumpRequest:Connect(function()
    if Settings.InfiniteJump and Humanoid then
        Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
    end
end)

-- Click TP
Mouse.Button1Down:Connect(function()
    if Settings.ClickTP and UIS:IsKeyDown(Enum.KeyCode.E) then
        TP(Mouse.Hit.Position)
    end
end)

-- Anti-AFK
task.spawn(function()
    while task.wait(60) do
        if Settings.AntiAFK then
            pcall(function()
                VirtualUser:CaptureController()
                VirtualUser:ClickButton2(Vector2.new())
            end)
        end
    end
end)

-- ESP Update
task.spawn(function()
    while task.wait(3) do
        if Settings.ESP then
            for _, p in pairs(Players:GetPlayers()) do
                if p ~= Player and p.Character and not p.Character:FindFirstChild("ESPHighlight") then
                    local h = Instance.new("Highlight")
                    h.Name = "ESPHighlight"
                    h.FillColor = Color3.new(1, 0, 0)
                    h.FillTransparency = 0.5
                    h.Parent = p.Character
                end
            end
        end
    end
end)

-- Auto Respawn
task.spawn(function()
    while task.wait(1) do
        if Settings.AutoRespawn and Humanoid and Humanoid.Health <= 0 then
            task.wait(2)
            pcall(function() Player:LoadCharacter() end)
        end
    end
end)

-- Done!
Rayfield:Notify({
    Title = "🚗 CC2 V16 ULTIMATE PLUS",
    Content = "300+ Features + Speed 1K-50K + Turn 0-200!",
    Duration = 5
})

Notify("Success!", "V16 Ultimate Plus Loaded!", 5)

Features & Information

a universile script mostly for car crushers 2 but works on any game change car speed tuurn speed and much more 300+ features

Community Comments (2)

masonpatrick1009masonpatrick1009Mar 13, 2026

takes a few secounds to load any thng wrong lem me know i will try to fix

Mikenation924Mikenation924Jun 24, 2026

Is this script FE?

More Scripts for Universal Scripts