XENO COMPATIBLE AIM ESP CHAMS SOURCE CODE
Key Required

XENO COMPATIBLE AIM ESP CHAMS SOURCE CODE

FRONTLINESleetleet 2.5K views 140 executesUpdated Nov 30, 2025
4.2/ 5(6 votes)
5183% Positive
Lua Script•1290 lines (46108 chars)
--This was made for xeno compatibility for a more robust script visit the original

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")
local GuiService = game:GetService("GuiService")

local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()

local mousemoverel = mousemoverel or (Input and Input.MouseMove) or nil

local Config = {
    ESP_Enabled = true,
    ESP_Box = true,
    ESP_BoxStyle = "Full",
    ESP_Name = true,
    ESP_Distance = true,
    ESP_Tracer = false,
    ESP_DeadCheck = true,
    ESP_MaxDist = 1500,
    ESP_Chams = false,
    ESP_TeamCheck = true,
    ESP_Rainbow = false,
    
    RADAR_Enabled = true,
    RADAR_Size = 130,
    RADAR_Range = 200,
    
    AIM_Enabled = false,
    AIM_FOV = 250,
    AIM_Smooth = 0.12,
    AIM_ShowFOV = true,
    AIM_TargetPart = "Auto",
    AIM_TeamCheck = true,
    
    MISC_Noclip = false,
    MISC_FullBright = false,
    
    MENU_Open = true,
    MENU_Tab = 1
}

local Tuning = {
    CacheRate = 0.033,
    CleanupRate = 0.5,
    BoxRatio = 0.55,
    CornerLen = 8,
    RadarDotSize = 6
}

local Palette = {
    Enemy = Color3.fromRGB(220, 60, 60),
    Dead = Color3.fromRGB(90, 90, 95),
    Tracer = Color3.fromRGB(255, 120, 80),
    
    RadarBg = Color3.fromRGB(15, 15, 18),
    RadarBorder = Color3.fromRGB(220, 60, 60),
    RadarGrid = Color3.fromRGB(35, 35, 40),
    RadarYou = Color3.fromRGB(80, 255, 120),
    
    MenuBg = Color3.fromRGB(14, 14, 18),
    MenuPanel = Color3.fromRGB(20, 20, 26),
    MenuBorder = Color3.fromRGB(40, 40, 50),
    MenuAccent = Color3.fromRGB(220, 60, 60),
    MenuText = Color3.fromRGB(220, 220, 225),
    MenuTextDim = Color3.fromRGB(110, 110, 120),
    MenuOn = Color3.fromRGB(80, 220, 100),
    MenuOff = Color3.fromRGB(55, 55, 65),
    MenuTab = Color3.fromRGB(18, 18, 22),
    MenuTabActive = Color3.fromRGB(220, 60, 60),
    
    FOV_Circle = Color3.fromRGB(255, 255, 255),
    FOV_Active = Color3.fromRGB(80, 255, 120)
}

local State = {
    Unloaded = false,
    Aiming = false,
    RainbowHue = 0
}

local OriginalLighting = {
    Brightness = Lighting.Brightness,
    Ambient = Lighting.Ambient
}

local DeathTracker = {}
local WeaponPatterns = {
    "upper_receiver", "lower_receiver", "receiver", "barrel", 
    "magazine", "handguard", "stock", "slide", "pump", "grip",
    "mp5", "m4", "glock", "awm", "vector", "asval", "ebr", "m500", "pp2000", "fix"
}

local Connections = {}
local chamsObjects = {}

local UI = {}
UI.ScreenGui = Instance.new("ScreenGui")
UI.ScreenGui.Name = "FrontlinesXeno"
UI.ScreenGui.ResetOnSpawn = false
UI.ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
UI.ScreenGui.DisplayOrder = 999
UI.ScreenGui.IgnoreGuiInset = true

pcall(function() UI.ScreenGui.Parent = game:GetService("CoreGui") end)
if not UI.ScreenGui.Parent then
    UI.ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
end

local function IsWeaponModel(obj)
    if not obj:IsA("Model") then return false, nil end
    if obj.Name == "soldier_model" then return false, nil end
    if obj.Name:find("friendly_marker") then return false, nil end
    
    local weaponPos = nil
    local isWeapon = false
    
    local objNameLower = obj.Name:lower()
    for _, pattern in ipairs(WeaponPatterns) do
        if objNameLower:find(pattern, 1, true) then
            isWeapon = true
            break
        end
    end
    
    if not isWeapon then
        for _, child in ipairs(obj:GetChildren()) do
            local childNameLower = child.Name:lower()
            for _, pattern in ipairs(WeaponPatterns) do
                if childNameLower:find(pattern, 1, true) then
                    isWeapon = true
                    if child:IsA("BasePart") then
                        weaponPos = child.Position
                    end
                    break
                end
            end
            if isWeapon then break end
        end
    end
    
    if isWeapon and not weaponPos then
        local part = obj:FindFirstChildWhichIsA("BasePart", true)
        if part then weaponPos = part.Position end
    end
    
    return isWeapon, weaponPos
end

local function GetWeaponsNearby(position, radius)
    local weapons = {}
    for _, obj in ipairs(Workspace:GetChildren()) do
        local isWeapon, weaponPos = IsWeaponModel(obj)
        if isWeapon and weaponPos and (weaponPos - position).Magnitude < radius then
            weapons[obj] = true
        end
    end
    return weapons
end

local function HasNewWeaponNearby(position, knownWeapons, radius)
    for _, obj in ipairs(Workspace:GetChildren()) do
        local isWeapon, weaponPos = IsWeaponModel(obj)
        if isWeapon and weaponPos and (weaponPos - position).Magnitude < radius and not knownWeapons[obj] then
            return true
        end
    end
    return false
end

local function IsModelDead(model)
    local root = model:FindFirstChild("HumanoidRootPart")
    if not root then return false end
    
    local pos = root.Position
    local now = tick()
    
    if not DeathTracker[model] then
        DeathTracker[model] = {
            lastPos = pos, lastMoveTime = now, wasActive = false,
            isDead = false, frozenTime = 0,
            knownWeapons = GetWeaponsNearby(pos, 10), lastWeaponCheck = now
        }
        return false
    end
    
    local data = DeathTracker[model]
    local delta = (pos - data.lastPos)
    local isMoving = Vector3.new(delta.X, 0, delta.Z).Magnitude > 0.08 or math.abs(delta.Y) > 0.15
    
    if isMoving then
        data.lastMoveTime = now
        data.wasActive = true
        data.frozenTime = 0
        data.knownWeapons = GetWeaponsNearby(pos, 10)
        data.lastWeaponCheck = now
        data.isDead = false
    else
        data.frozenTime = now - data.lastMoveTime
    end
    
    if not data.isDead and data.wasActive and data.frozenTime > 0.1 and data.frozenTime < 3.0 then
        if now - data.lastWeaponCheck > 0.05 then
            data.lastWeaponCheck = now
            if HasNewWeaponNearby(pos, data.knownWeapons, 6) then
                data.isDead = true
            end
        end
    end
    
    data.lastPos = pos
    return data.isDead
end

local function CleanupDeathTracker()
    for model, _ in pairs(DeathTracker) do
        if not model or not model.Parent then
            DeathTracker[model] = nil
        end
    end
end

local function IsLocalPlayer(model)
    local myChar = LocalPlayer.Character
    if not myChar then return false end
    if model == myChar then return true end
    local myRoot = myChar:FindFirstChild("HumanoidRootPart")
    local modelRoot = model:FindFirstChild("HumanoidRootPart")
    if myRoot and modelRoot and (myRoot.Position - modelRoot.Position).Magnitude < 1 then
        return true
    end
    return false
end

local function IsEnemy(model)
    if not model:IsA("Model") or model.Name ~= "soldier_model" then return false end
    if IsLocalPlayer(model) then return false end
    if Config.ESP_TeamCheck and model:FindFirstChild("friendly_marker") then return false end
    return true
end

local function GetRoot(model)
    return model:FindFirstChild("HumanoidRootPart")
end

local function GetRainbow()
    return Color3.fromHSV(State.RainbowHue, 1, 1)
end

local function GetEspColor()
    return Config.ESP_Rainbow and GetRainbow() or Palette.Enemy
end

local ESP = {
    cache = {},
    posCache = {},
    lastPosUpdate = 0,
    lastCleanup = 0
}

function ESP.CreateDrawings(model)
    if ESP.cache[model] then return end
    
    local box = Instance.new("Frame")
    box.Name = "Box"
    box.BackgroundTransparency = 1
    box.BorderSizePixel = 0
    box.Visible = false
    box.Parent = UI.ScreenGui
    
    local boxStroke = Instance.new("UIStroke")
    boxStroke.Color = Palette.Enemy
    boxStroke.Thickness = 1
    boxStroke.Parent = box
    
    local corners = {}
    for i = 1, 8 do
        local c = Instance.new("Frame")
        c.Name = "C" .. i
        c.BackgroundColor3 = Palette.Enemy
        c.BorderSizePixel = 0
        c.Visible = false
        c.Parent = UI.ScreenGui
        corners[i] = c
    end
    
    local name = Instance.new("TextLabel")
    name.Name = "Name"
    name.BackgroundTransparency = 1
    name.Font = Enum.Font.RobotoMono
    name.TextSize = 13
    name.TextColor3 = Color3.new(1, 1, 1)
    name.TextStrokeTransparency = 0
    name.Text = "ENEMY"
    name.Size = UDim2.new(0, 200, 0, 16)
    name.TextXAlignment = Enum.TextXAlignment.Center
    name.Visible = false
    name.Parent = UI.ScreenGui
    
    local dist = Instance.new("TextLabel")
    dist.Name = "Dist"
    dist.BackgroundTransparency = 1
    dist.Font = Enum.Font.RobotoMono
    dist.TextSize = 11
    dist.TextColor3 = Color3.fromRGB(170, 170, 170)
    dist.TextStrokeTransparency = 0
    dist.Size = UDim2.new(0, 200, 0, 14)
    dist.TextXAlignment = Enum.TextXAlignment.Center
    dist.Visible = false
    dist.Parent = UI.ScreenGui
    
    local tracer = Instance.new("Frame")
    tracer.Name = "Tracer"
    tracer.BackgroundColor3 = Palette.Tracer
    tracer.BorderSizePixel = 0
    tracer.AnchorPoint = Vector2.new(0.5, 0)
    tracer.Visible = false
    tracer.Parent = UI.ScreenGui
    
    local deadX1 = Instance.new("Frame")
    deadX1.Name = "X1"
    deadX1.BackgroundColor3 = Palette.Dead
    deadX1.BorderSizePixel = 0
    deadX1.Rotation = 45
    deadX1.Visible = false
    deadX1.Parent = UI.ScreenGui
    
    local deadX2 = Instance.new("Frame")
    deadX2.Name = "X2"
    deadX2.BackgroundColor3 = Palette.Dead
    deadX2.BorderSizePixel = 0
    deadX2.Rotation = -45
    deadX2.Visible = false
    deadX2.Parent = UI.ScreenGui
    
    ESP.cache[model] = {
        Box = box, BoxStroke = boxStroke, Corners = corners,
        Name = name, Dist = dist, Tracer = tracer, DeadX1 = deadX1, DeadX2 = deadX2
    }
end

function ESP.Hide(esp)
    if not esp then return end
    esp.Box.Visible = false
    for _, c in ipairs(esp.Corners) do c.Visible = false end
    esp.Name.Visible = false
    esp.Dist.Visible = false
    esp.Tracer.Visible = false
    esp.DeadX1.Visible = false
    esp.DeadX2.Visible = false
end

function ESP.Destroy(esp)
    if not esp then return end
    pcall(function() esp.Box:Destroy() end)
    for _, c in ipairs(esp.Corners) do pcall(function() c:Destroy() end) end
    pcall(function() esp.Name:Destroy() end)
    pcall(function() esp.Dist:Destroy() end)
    pcall(function() esp.Tracer:Destroy() end)
    pcall(function() esp.DeadX1:Destroy() end)
    pcall(function() esp.DeadX2:Destroy() end)
end

function ESP.Render(esp, model, posData, cam, screenSize)
    if not esp or not model then return end
    
    local root = model:FindFirstChild("HumanoidRootPart")
    if not root then
        ESP.Hide(esp)
        return
    end
    
    local rootPos = posData.pos
    local dist = posData.dist
    
    if dist > Config.ESP_MaxDist then
        ESP.Hide(esp)
        return
    end
    
    local rs = cam:WorldToViewportPoint(rootPos)
    
    if rs.Z <= 0 or rs.X < -100 or rs.X > screenSize.X + 100 or rs.Y < -100 or rs.Y > screenSize.Y + 100 then
        ESP.Hide(esp)
        return
    end
    
    local isDead = Config.ESP_DeadCheck and IsModelDead(model) or false
    local baseCol = isDead and Palette.Dead or GetEspColor()
    
    local baseSize = 1200 / math.max(rs.Z, 1)
    local boxHeight = math.clamp(baseSize, 25, screenSize.Y * 0.8)
    local boxWidth = math.clamp(boxHeight * Tuning.BoxRatio, 15, screenSize.X * 0.5)
    
    local cx, cy = rs.X, rs.Y
    local boxTop = cy - boxHeight * 0.55
    local boxBottom = cy + boxHeight * 0.45
    local boxLeft = cx - boxWidth / 2
    local boxRight = cx + boxWidth / 2
    
    esp.DeadX1.Visible = false
    esp.DeadX2.Visible = false
    
    if isDead then
        esp.Box.Visible = false
        for _, c in ipairs(esp.Corners) do c.Visible = false end
        
        local xSize = math.min(boxWidth, boxHeight) * 0.4
        esp.DeadX1.Position = UDim2.new(0, cx - xSize, 0, cy - 2)
        esp.DeadX1.Size = UDim2.new(0, xSize * 2, 0, 4)
        esp.DeadX1.Visible = true
        esp.DeadX2.Position = UDim2.new(0, cx - xSize, 0, cy - 2)
        esp.DeadX2.Size = UDim2.new(0, xSize * 2, 0, 4)
        esp.DeadX2.Visible = true
        
        esp.Name.Text = "DEAD"
        esp.Name.Position = UDim2.new(0, cx - 100, 0, cy - boxHeight * 0.3 - 14)
        esp.Name.TextColor3 = Palette.Dead
        esp.Name.Visible = true
        esp.Dist.Visible = false
        esp.Tracer.Visible = false
    else
        if Config.ESP_Box then
            if Config.ESP_BoxStyle == "Full" then
                for _, c in ipairs(esp.Corners) do c.Visible = false end
                esp.Box.Position = UDim2.new(0, boxLeft, 0, boxTop)
                esp.Box.Size = UDim2.new(0, boxWidth, 0, boxHeight)
                esp.BoxStroke.Color = baseCol
                esp.Box.Visible = true
            else
                esp.Box.Visible = false
                local cl = Tuning.CornerLen
                local corners = esp.Corners
                corners[1].Position = UDim2.new(0, boxLeft, 0, boxTop)
                corners[1].Size = UDim2.new(0, cl, 0, 1)
                corners[2].Position = UDim2.new(0, boxLeft, 0, boxTop)
                corners[2].Size = UDim2.new(0, 1, 0, cl)
                corners[3].Position = UDim2.new(0, boxRight - cl, 0, boxTop)
                corners[3].Size = UDim2.new(0, cl, 0, 1)
                corners[4].Position = UDim2.new(0, boxRight - 1, 0, boxTop)
                corners[4].Size = UDim2.new(0, 1, 0, cl)
                corners[5].Position = UDim2.new(0, boxLeft, 0, boxBottom - 1)
                corners[5].Size = UDim2.new(0, cl, 0, 1)
                corners[6].Position = UDim2.new(0, boxLeft, 0, boxBottom - cl)
                corners[6].Size = UDim2.new(0, 1, 0, cl)
                corners[7].Position = UDim2.new(0, boxRight - cl, 0, boxBottom - 1)
                corners[7].Size = UDim2.new(0, cl, 0, 1)
                corners[8].Position = UDim2.new(0, boxRight - 1, 0, boxBottom - cl)
                corners[8].Size = UDim2.new(0, 1, 0, cl)
                for _, c in ipairs(corners) do
                    c.BackgroundColor3 = baseCol
                    c.Visible = true
                end
            end
        else
            esp.Box.Visible = false
            for _, c in ipairs(esp.Corners) do c.Visible = false end
        end
        
        if Config.ESP_Name then
            esp.Name.Text = "ENEMY"
            esp.Name.Position = UDim2.new(0, cx - 100, 0, boxTop - 16)
            esp.Name.TextColor3 = baseCol
            esp.Name.Visible = true
        else
            esp.Name.Visible = false
        end
        
        if Config.ESP_Distance then
            esp.Dist.Text = math.floor(dist) .. "m"
            esp.Dist.Position = UDim2.new(0, cx - 100, 0, boxBottom + 4)
            esp.Dist.Visible = true
        else
            esp.Dist.Visible = false
        end
        
        if Config.ESP_Tracer then
            esp.Tracer.Position = UDim2.new(0, cx, 0, boxBottom)
            esp.Tracer.Size = UDim2.new(0, 1, 0, screenSize.Y - boxBottom)
            esp.Tracer.BackgroundColor3 = Palette.Tracer
            esp.Tracer.Visible = true
        else
            esp.Tracer.Visible = false
        end
    end
end

function ESP.CachePositions()
    local myChar = LocalPlayer.Character
    local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart")
    local myPos = myRoot and myRoot.Position or Vector3.zero
    
    ESP.posCache = {}
    
    for _, model in ipairs(Workspace:GetChildren()) do
        if model:IsA("Model") and model.Name == "soldier_model" and not IsLocalPlayer(model) then
            local root = model:FindFirstChild("HumanoidRootPart")
            if root then
                ESP.posCache[model] = {
                    pos = root.Position,
                    dist = (root.Position - myPos).Magnitude
                }
            end
        end
    end
end

function ESP.Cleanup()
    local toRemove = {}
    for model, esp in pairs(ESP.cache) do
        if not model or not model.Parent or not model:FindFirstChild("HumanoidRootPart") then
            ESP.Hide(esp)
            ESP.Destroy(esp)
            toRemove[#toRemove + 1] = model
        end
    end
    for _, model in ipairs(toRemove) do
        ESP.cache[model] = nil
        DeathTracker[model] = nil
    end
    CleanupDeathTracker()
end

function ESP.Step(cam, screenSize)
    if State.Unloaded or not Config.ESP_Enabled then
        for _, esp in pairs(ESP.cache) do ESP.Hide(esp) end
        return
    end
    
    local now = tick()
    
    if now - ESP.lastCleanup > Tuning.CleanupRate then
        ESP.lastCleanup = now
        ESP.Cleanup()
    end
    
    if now - ESP.lastPosUpdate > Tuning.CacheRate then
        ESP.lastPosUpdate = now
        ESP.CachePositions()
    end
    
    local validModels = {}
    
    for model, posData in pairs(ESP.posCache) do
        if model and model.Parent then
            if Config.ESP_TeamCheck and model:FindFirstChild("friendly_marker") then
                if ESP.cache[model] then ESP.Hide(ESP.cache[model]) end
            else
                validModels[model] = true
                if not ESP.cache[model] then
                    ESP.CreateDrawings(model)
                end
                ESP.Render(ESP.cache[model], model, posData, cam, screenSize)
            end
        end
    end
    
    for model, esp in pairs(ESP.cache) do
        if not validModels[model] then ESP.Hide(esp) end
    end
end

local Chams = {}

function Chams.Create(model)
    if chamsObjects[model] then return end
    local h = Instance.new("Highlight")
    h.Name = "_Chams"
    h.Adornee = model
    h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    h.FillColor = GetEspColor()
    h.OutlineColor = Color3.new(1, 1, 1)
    h.FillTransparency = 0.6
    h.OutlineTransparency = 0
    h.Parent = model
    chamsObjects[model] = h
end

function Chams.Update(model)
    local h = chamsObjects[model]
    if not h then return end
    local isDead = Config.ESP_DeadCheck and IsModelDead(model) or false
    h.FillColor = isDead and Palette.Dead or GetEspColor()
    h.OutlineColor = isDead and Palette.Dead or Color3.new(1, 1, 1)
    h.Enabled = true
end

function Chams.Remove(model)
    if chamsObjects[model] then
        chamsObjects[model]:Destroy()
        chamsObjects[model] = nil
    end
end

function Chams.ClearAll()
    for model, _ in pairs(chamsObjects) do Chams.Remove(model) end
    chamsObjects = {}
end

function Chams.Step()
    if State.Unloaded or not Config.ESP_Enabled or not Config.ESP_Chams then
        Chams.ClearAll()
        return
    end
    
    local validModels = {}
    for model, _ in pairs(ESP.posCache) do
        if model and model.Parent and IsEnemy(model) then
            validModels[model] = true
            if not chamsObjects[model] then Chams.Create(model) end
            Chams.Update(model)
        end
    end
    for model, _ in pairs(chamsObjects) do
        if not validModels[model] then Chams.Remove(model) end
    end
end

local radarDots = {}
local RadarFrame = Instance.new("Frame")
RadarFrame.Name = "Radar"
RadarFrame.BackgroundColor3 = Palette.RadarBg
RadarFrame.BackgroundTransparency = 0.08
RadarFrame.BorderSizePixel = 0
RadarFrame.AnchorPoint = Vector2.new(1, 0)
RadarFrame.Parent = UI.ScreenGui

local RadarStroke = Instance.new("UIStroke")
RadarStroke.Color = Palette.RadarBorder
RadarStroke.Thickness = 1
RadarStroke.Parent = RadarFrame

local RadarCross1 = Instance.new("Frame")
RadarCross1.BackgroundColor3 = Palette.RadarGrid
RadarCross1.BorderSizePixel = 0
RadarCross1.AnchorPoint = Vector2.new(0.5, 0)
RadarCross1.Parent = RadarFrame

local RadarCross2 = Instance.new("Frame")
RadarCross2.BackgroundColor3 = Palette.RadarGrid
RadarCross2.BorderSizePixel = 0
RadarCross2.AnchorPoint = Vector2.new(0, 0.5)
RadarCross2.Parent = RadarFrame

local RadarCenter = Instance.new("Frame")
RadarCenter.BackgroundColor3 = Palette.RadarYou
RadarCenter.BorderSizePixel = 0
RadarCenter.AnchorPoint = Vector2.new(0.5, 0.5)
RadarCenter.Size = UDim2.new(0, 8, 0, 8)
RadarCenter.Parent = RadarFrame
Instance.new("UICorner", RadarCenter).CornerRadius = UDim.new(1, 0)

for i = 1, 50 do
    local dot = Instance.new("Frame")
    dot.BackgroundColor3 = Palette.Enemy
    dot.BorderSizePixel = 0
    dot.AnchorPoint = Vector2.new(0.5, 0.5)
    dot.Size = UDim2.new(0, Tuning.RadarDotSize, 0, Tuning.RadarDotSize)
    dot.Visible = false
    dot.Parent = RadarFrame
    Instance.new("UICorner", dot).CornerRadius = UDim.new(1, 0)
    radarDots[i] = dot
end

local function UpdateRadar(cam)
    if not Config.RADAR_Enabled then
        RadarFrame.Visible = false
        return
    end
    
    local myChar = LocalPlayer.Character
    local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart")
    if not myRoot then
        RadarFrame.Visible = false
        return
    end
    
    local size = Config.RADAR_Size
    RadarFrame.Position = UDim2.new(1, -10, 0, 10)
    RadarFrame.Size = UDim2.new(0, size, 0, size)
    RadarFrame.Visible = true
    
    RadarCross1.Position = UDim2.new(0.5, 0, 0, 8)
    RadarCross1.Size = UDim2.new(0, 1, 1, -16)
    RadarCross2.Position = UDim2.new(0, 8, 0.5, 0)
    RadarCross2.Size = UDim2.new(1, -16, 0, 1)
    RadarCenter.Position = UDim2.new(0.5, 0, 0.5, 0)
    
    local myLook = cam.CFrame.LookVector
    local myAngle = math.atan2(-myLook.X, -myLook.Z)
    local cosA, sinA = math.cos(myAngle), math.sin(myAngle)
    local scale = (size/2 - 8) / Config.RADAR_Range
    
    local dotIdx = 1
    for model, posData in pairs(ESP.posCache) do
        if model and model.Parent and IsEnemy(model) then
            local rx = posData.pos.X - myRoot.Position.X
            local rz = posData.pos.Z - myRoot.Position.Z
            local dist2D = math.sqrt(rx^2 + rz^2)
            
            if dist2D < Config.RADAR_Range and dotIdx <= #radarDots then
                local rotX = rx * cosA - rz * sinA
                local rotZ = rx * sinA + rz * cosA
                local radarX, radarY = rotX * scale, rotZ * scale
                local maxD = size/2 - 8
                local rDist = math.sqrt(radarX^2 + radarY^2)
                if rDist > maxD then
                    radarX, radarY = radarX/rDist * maxD, radarY/rDist * maxD
                end
                
                local dot = radarDots[dotIdx]
                dot.Position = UDim2.new(0.5, radarX, 0.5, radarY)
                dot.BackgroundColor3 = (Config.ESP_DeadCheck and IsModelDead(model)) and Palette.Dead or GetEspColor()
                dot.Visible = true
                dotIdx = dotIdx + 1
            end
        end
    end
    for i = dotIdx, #radarDots do radarDots[i].Visible = false end
end

local FOVCircle = Instance.new("Frame")
FOVCircle.BackgroundTransparency = 1
FOVCircle.BorderSizePixel = 0
FOVCircle.AnchorPoint = Vector2.new(0.5, 0.5)
FOVCircle.Parent = UI.ScreenGui
local FOVStroke = Instance.new("UIStroke")
FOVStroke.Color = Palette.FOV_Circle
FOVStroke.Thickness = 1
FOVStroke.Parent = FOVCircle
Instance.new("UICorner", FOVCircle).CornerRadius = UDim.new(1, 0)

local Aimbot = { currentTarget = nil, lastTargetTime = 0 }

function Aimbot.GetTarget(cam)
    local best, bestScore, bestModel = nil, math.huge, nil
    local mousePos = Vector2.new(Mouse.X, Mouse.Y)
    local myChar = LocalPlayer.Character
    local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart")
    local myPos = myRoot and myRoot.Position or cam.CFrame.Position
    
    for model, posData in pairs(ESP.posCache) do
        if not model or not model.Parent then continue end
        if Config.AIM_TeamCheck and model:FindFirstChild("friendly_marker") then continue end
        if Config.ESP_DeadCheck and IsModelDead(model) then continue end
        
        local parts = {}
        if Config.AIM_TargetPart == "Auto" then
            parts = {model:FindFirstChild("HumanoidRootPart"), model:FindFirstChild("TPVBodyVanillaHead")}
        elseif Config.AIM_TargetPart == "Head" then
            parts = {model:FindFirstChild("TPVBodyVanillaHead"), model:FindFirstChild("Head")}
        elseif Config.AIM_TargetPart == "Torso" then
            parts = {model:FindFirstChild("TPVBodyVanillaTorsoFront")}
        else
            parts = {model:FindFirstChild("HumanoidRootPart")}
        end
        
        for _, part in ipairs(parts) do
            if part then
                local sp, onScreen = cam:WorldToViewportPoint(part.Position)
                if onScreen and sp.Z > 0 then
                    local screenDist = (Vector2.new(sp.X, sp.Y) - mousePos).Magnitude
                    if screenDist <= Config.AIM_FOV then
                        local score = screenDist / Config.AIM_FOV
                        if model == Aimbot.currentTarget then score = score * 0.7 end
                        if score < bestScore then
                            bestScore = score
                            best = part.Position
                            bestModel = model
                        end
                    end
                end
                if Config.AIM_TargetPart ~= "Auto" then break end
            end
        end
    end
    
    if bestModel then
        Aimbot.currentTarget = bestModel
        Aimbot.lastTargetTime = tick()
    elseif tick() - Aimbot.lastTargetTime > 0.5 then
        Aimbot.currentTarget = nil
    end
    return best
end

function Aimbot.Step(cam, screenCenter)
    local guiInset = GuiService:GetGuiInset()
    local isAiming = State.Aiming
    pcall(function() isAiming = isAiming or UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) end)
    
    if Config.AIM_Enabled and Config.AIM_ShowFOV then
        FOVCircle.Position = UDim2.new(0, screenCenter.X, 0, screenCenter.Y + guiInset.Y)
        FOVCircle.Size = UDim2.new(0, Config.AIM_FOV * 2, 0, Config.AIM_FOV * 2)
        FOVStroke.Color = isAiming and Palette.FOV_Active or Palette.FOV_Circle
        FOVCircle.Visible = true
    else
        FOVCircle.Visible = false
    end
    
    if not Config.AIM_Enabled or not isAiming then return end
    
    local target = Aimbot.GetTarget(cam)
    if not target then return end
    
    local mousePos = Vector2.new(Mouse.X, Mouse.Y)
    local sp = cam:WorldToViewportPoint(target)
    local delta = Vector2.new(sp.X - mousePos.X, sp.Y - mousePos.Y)
    if delta.Magnitude < 2 then return end
    
    if mousemoverel then
        pcall(function() mousemoverel(delta.X * Config.AIM_Smooth, delta.Y * Config.AIM_Smooth) end)
    end
end

local Noclip = { Initialized = false, Connection = nil }
function Noclip.DisableCollision(m)
    for _, p in pairs(m:GetDescendants()) do
        if p:IsA("BasePart") then p.CanCollide = false end
    end
end
function Noclip.Init()
    if Noclip.Initialized then return end
    Noclip.Initialized = true
    for _, obj in pairs(Workspace:GetDescendants()) do
        if obj.Name:find("soldier") then Noclip.DisableCollision(obj) end
    end
    Noclip.Connection = Workspace.DescendantAdded:Connect(function(obj)
        if not Config.MISC_Noclip then return end
        task.wait(0.3)
        if obj.Name:find("soldier") then
            repeat task.wait() until obj:FindFirstChild("HumanoidRootPart")
            Noclip.DisableCollision(obj)
        end
    end)
end
function Noclip.Step()
    if Config.MISC_Noclip and not Noclip.Initialized then Noclip.Init() end
end

local function ApplyMisc()
    if Config.MISC_FullBright then
        Lighting.Brightness = 2
        Lighting.Ambient = Color3.new(1, 1, 1)
    else
        Lighting.Brightness = OriginalLighting.Brightness
        Lighting.Ambient = OriginalLighting.Ambient
    end
end

local Tabs = {{name = "ESP"}, {name = "AIM"}, {name = "MISC"}}
local MenuItems = {
    {tab = 1, name = "VISUALS", type = "label"},
    {tab = 1, name = "Enable ESP", key = "ESP_Enabled", type = "toggle"},
    {tab = 1, name = "Box ESP", key = "ESP_Box", type = "toggle"},
    {tab = 1, name = "Box Style", key = "ESP_BoxStyle", type = "dropdown", options = {"Full", "Corner"}},
    {tab = 1, name = "Name", key = "ESP_Name", type = "toggle"},
    {tab = 1, name = "Distance", key = "ESP_Distance", type = "toggle"},
    {tab = 1, name = "Tracer", key = "ESP_Tracer", type = "toggle"},
    {tab = 1, name = "Dead Check", key = "ESP_DeadCheck", type = "toggle"},
    {tab = 1, name = "Chams", key = "ESP_Chams", type = "toggle"},
    {tab = 1, name = "Rainbow", key = "ESP_Rainbow", type = "toggle"},
    {tab = 1, name = "Team Check", key = "ESP_TeamCheck", type = "toggle"},
    {tab = 1, name = "Max Distance", key = "ESP_MaxDist", type = "slider", min = 500, max = 3000, step = 100},
    {tab = 1, name = "RADAR", type = "label"},
    {tab = 1, name = "Enable Radar", key = "RADAR_Enabled", type = "toggle"},
    {tab = 1, name = "Radar Size", key = "RADAR_Size", type = "slider", min = 80, max = 180, step = 10},
    {tab = 1, name = "Radar Range", key = "RADAR_Range", type = "slider", min = 100, max = 400, step = 25},
    
    {tab = 2, name = "AIMBOT", type = "label"},
    {tab = 2, name = "Enable Aimbot", key = "AIM_Enabled", type = "toggle"},
    {tab = 2, name = "Show FOV", key = "AIM_ShowFOV", type = "toggle"},
    {tab = 2, name = "FOV Size", key = "AIM_FOV", type = "slider", min = 50, max = 500, step = 25},
    {tab = 2, name = "Smoothness", key = "AIM_Smooth", type = "slider", min = 0.05, max = 0.5, step = 0.01},
    {tab = 2, name = "Target Part", key = "AIM_TargetPart", type = "dropdown", options = {"Auto", "Head", "Torso", "Root"}},
    {tab = 2, name = "Team Check", key = "AIM_TeamCheck", type = "toggle"},
    
    {tab = 3, name = "MOVEMENT", type = "label"},
    {tab = 3, name = "Ghost Mode", key = "MISC_Noclip", type = "toggle"},
    {tab = 3, name = "VISUAL", type = "label"},
    {tab = 3, name = "Full Bright", key = "MISC_FullBright", type = "toggle"}
}

local GUI = {
    Frame = nil,
    Position = nil,
    Dragging = false,
    DragOffset = Vector2.zero,
    ScrollOffset = 0,
    MaxScroll = 0,
    Items = {},
    SliderDragging = nil
}

function GUI.Create()
    local menuW, menuH = 300, 380
    local titleH, tabH, footerH = 24, 28, 22
    
    local main = Instance.new("Frame")
    main.Name = "Menu"
    main.BackgroundColor3 = Palette.MenuBg
    main.BackgroundTransparency = 0.04
    main.BorderSizePixel = 0
    main.Size = UDim2.new(0, menuW, 0, menuH)
    main.Position = UDim2.new(0, 20, 0.5, -menuH/2)
    main.Active = true
    main.Parent = UI.ScreenGui
    GUI.Frame = main
    
    local stroke = Instance.new("UIStroke")
    stroke.Color = Palette.MenuBorder
    stroke.Thickness = 1
    stroke.Parent = main
    
    local title = Instance.new("Frame")
    title.Name = "Title"
    title.BackgroundColor3 = Palette.MenuTab
    title.BorderSizePixel = 0
    title.Size = UDim2.new(1, 0, 0, titleH)
    title.Parent = main
    
    local titleText = Instance.new("TextLabel")
    titleText.BackgroundTransparency = 1
    titleText.Position = UDim2.new(0, 10, 0, 0)
    titleText.Size = UDim2.new(0, 150, 1, 0)
    titleText.Font = Enum.Font.GothamBold
    titleText.TextSize = 14
    titleText.TextColor3 = Palette.MenuAccent
    titleText.TextXAlignment = Enum.TextXAlignment.Left
    titleText.Text = "FRONTLINES"
    titleText.Parent = title
    
    local xenoTag = Instance.new("TextLabel")
    xenoTag.BackgroundTransparency = 1
    xenoTag.Position = UDim2.new(0, 110, 0, 0)
    xenoTag.Size = UDim2.new(0, 100, 1, 0)
    xenoTag.Font = Enum.Font.RobotoMono
    xenoTag.TextSize = 10
    xenoTag.TextColor3 = Color3.fromRGB(80, 255, 120)
    xenoTag.TextXAlignment = Enum.TextXAlignment.Left
    xenoTag.Text = "XENO"
    xenoTag.Parent = title
    
    local hotkeyText = Instance.new("TextLabel")
    hotkeyText.BackgroundTransparency = 1
    hotkeyText.Position = UDim2.new(1, -90, 0, 0)
    hotkeyText.Size = UDim2.new(0, 80, 1, 0)
    hotkeyText.Font = Enum.Font.RobotoMono
    hotkeyText.TextSize = 10
    hotkeyText.TextColor3 = Palette.MenuTextDim
    hotkeyText.TextXAlignment = Enum.TextXAlignment.Right
    hotkeyText.Text = "[INS] [HOME]"
    hotkeyText.Parent = title
    
    local tabFrame = Instance.new("Frame")
    tabFrame.Name = "Tabs"
    tabFrame.BackgroundTransparency = 1
    tabFrame.Position = UDim2.new(0, 0, 0, titleH)
    tabFrame.Size = UDim2.new(1, 0, 0, tabH)
    tabFrame.Parent = main
    
    GUI.TabButtons = {}
    local tabW = menuW / #Tabs
    for i, tab in ipairs(Tabs) do
        local btn = Instance.new("TextButton")
        btn.Name = tab.name
        btn.BackgroundColor3 = Palette.MenuTab
        btn.BackgroundTransparency = 0.3
        btn.BorderSizePixel = 0
        btn.Position = UDim2.new(0, (i-1) * tabW, 0, 0)
        btn.Size = UDim2.new(0, tabW, 1, 0)
        btn.Font = Enum.Font.GothamBold
        btn.TextSize = 13
        btn.TextColor3 = Palette.MenuTextDim
        btn.Text = tab.name
        btn.AutoButtonColor = false
        btn.Parent = tabFrame
        
        local indicator = Instance.new("Frame")
        indicator.Name = "Indicator"
        indicator.BackgroundColor3 = Palette.MenuAccent
        indicator.BorderSizePixel = 0
        indicator.Position = UDim2.new(0, 0, 1, -2)
        indicator.Size = UDim2.new(1, 0, 0, 2)
        indicator.Visible = i == 1
        indicator.Parent = btn
        
        btn.MouseButton1Click:Connect(function()
            Config.MENU_Tab = i
            GUI.ScrollOffset = 0
            GUI.UpdateTabs()
            GUI.UpdateContent()
        end)
        
        GUI.TabButtons[i] = {Button = btn, Indicator = indicator}
    end
    
    local contentFrame = Instance.new("ScrollingFrame")
    contentFrame.Name = "Content"
    contentFrame.BackgroundTransparency = 1
    contentFrame.Position = UDim2.new(0, 8, 0, titleH + tabH + 4)
    contentFrame.Size = UDim2.new(1, -16, 1, -titleH - tabH - footerH - 8)
    contentFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
    contentFrame.ScrollBarThickness = 4
    contentFrame.ScrollBarImageColor3 = Palette.MenuAccent
    contentFrame.BorderSizePixel = 0
    contentFrame.Parent = main
    GUI.ContentFrame = contentFrame
    
    local layout = Instance.new("UIListLayout")
    layout.SortOrder = Enum.SortOrder.LayoutOrder
    layout.Padding = UDim.new(0, 2)
    layout.Parent = contentFrame
    
    local footer = Instance.new("Frame")
    footer.Name = "Footer"
    footer.BackgroundTransparency = 1
    footer.Position = UDim2.new(0, 0, 1, -footerH)
    footer.Size = UDim2.new(1, 0, 0, footerH)
    footer.Parent = main
    
    local credit = Instance.new("TextLabel")
    credit.BackgroundTransparency = 1
    credit.Position = UDim2.new(0, 10, 0, 0)
    credit.Size = UDim2.new(1, -20, 1, 0)
    credit.Font = Enum.Font.RobotoMono
    credit.TextSize = 11
    credit.TextColor3 = Palette.MenuTextDim
    credit.TextXAlignment = Enum.TextXAlignment.Right
    credit.Text = "made by leet"
    credit.Parent = footer
    
    title.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            GUI.Dragging = true
            local mouse = UserInputService:GetMouseLocation()
            GUI.DragOffset = mouse - Vector2.new(main.AbsolutePosition.X, main.AbsolutePosition.Y)
        end
    end)
    
    title.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            GUI.Dragging = false
        end
    end)
    
    GUI.UpdateContent()
end

function GUI.UpdateTabs()
    for i, tab in ipairs(GUI.TabButtons) do
        local isSelected = i == Config.MENU_Tab
        tab.Button.BackgroundTransparency = isSelected and 0.1 or 0.5
        tab.Button.TextColor3 = isSelected and Color3.new(1, 1, 1) or Palette.MenuTextDim
        tab.Indicator.Visible = isSelected
    end
end

function GUI.UpdateContent()
    for _, child in ipairs(GUI.ContentFrame:GetChildren()) do
        if child:IsA("Frame") then child:Destroy() end
    end
    GUI.Items = {}
    
    local order = 0
    for _, menuItem in ipairs(MenuItems) do
        if menuItem.tab == Config.MENU_Tab then
            order = order + 1
            local itemH = menuItem.type == "slider" and 38 or 24
            
            local item = Instance.new("Frame")
            item.Name = menuItem.name
            item.BackgroundColor3 = menuItem.type == "label" and Palette.MenuBg or Palette.MenuPanel
            item.BackgroundTransparency = menuItem.type == "label" and 0.5 or 0.1
            item.BorderSizePixel = 0
            item.Size = UDim2.new(1, 0, 0, itemH)
            item.LayoutOrder = order
            item.Parent = GUI.ContentFrame
            
            local label = Instance.new("TextLabel")
            label.BackgroundTransparency = 1
            label.Position = UDim2.new(0, 8, 0, 0)
            label.Size = UDim2.new(0.6, 0, 0, 24)
            label.Font = Enum.Font.RobotoMono
            label.TextSize = menuItem.type == "label" and 12 or 11
            label.TextColor3 = menuItem.type == "label" and Palette.MenuAccent or Palette.MenuText
            label.TextXAlignment = Enum.TextXAlignment.Left
            label.Text = menuItem.name
            label.Parent = item
            
            if menuItem.type == "toggle" then
                local toggle = Instance.new("Frame")
                toggle.Name = "Toggle"
                toggle.BackgroundColor3 = Config[menuItem.key] and Palette.MenuOn or Palette.MenuOff
                toggle.BorderSizePixel = 0
                toggle.Position = UDim2.new(1, -40, 0.5, -7)
                toggle.Size = UDim2.new(0, 28, 0, 14)
                toggle.Parent = item
                Instance.new("UICorner", toggle).CornerRadius = UDim.new(0, 7)
                
                local knob = Instance.new("Frame")
                knob.Name = "Knob"
                knob.BackgroundColor3 = Color3.new(1, 1, 1)
                knob.BorderSizePixel = 0
                knob.Position = Config[menuItem.key] and UDim2.new(1, -12, 0.5, -5) or UDim2.new(0, 2, 0.5, -5)
                knob.Size = UDim2.new(0, 10, 0, 10)
                knob.Parent = toggle
                Instance.new("UICorner", knob).CornerRadius = UDim.new(1, 0)
                
                local btn = Instance.new("TextButton")
                btn.BackgroundTransparency = 1
                btn.Size = UDim2.new(1, 0, 1, 0)
                btn.Text = ""
                btn.Parent = item
                
                btn.MouseButton1Click:Connect(function()
                    Config[menuItem.key] = not Config[menuItem.key]
                    toggle.BackgroundColor3 = Config[menuItem.key] and Palette.MenuOn or Palette.MenuOff
                    knob.Position = Config[menuItem.key] and UDim2.new(1, -12, 0.5, -5) or UDim2.new(0, 2, 0.5, -5)
                end)
                
            elseif menuItem.type == "slider" then
                local val = Config[menuItem.key]
                local valText = menuItem.step < 1 and string.format("%.2f", val) or tostring(math.floor(val))
                
                local valLabel = Instance.new("TextLabel")
                valLabel.Name = "Value"
                valLabel.BackgroundTransparency = 1
                valLabel.Position = UDim2.new(1, -50, 0, 0)
                valLabel.Size = UDim2.new(0, 45, 0, 20)
                valLabel.Font = Enum.Font.RobotoMono
                valLabel.TextSize = 11
                valLabel.TextColor3 = Palette.MenuTextDim
                valLabel.TextXAlignment = Enum.TextXAlignment.Right
                valLabel.Text = valText
                valLabel.Parent = item
                
                local track = Instance.new("Frame")
                track.Name = "Track"
                track.BackgroundColor3 = Palette.MenuOff
                track.BorderSizePixel = 0
                track.Position = UDim2.new(0, 8, 0, 24)
                track.Size = UDim2.new(1, -16, 0, 6)
                track.Parent = item
                Instance.new("UICorner", track).CornerRadius = UDim.new(0, 3)
                
                local pct = (val - menuItem.min) / (menuItem.max - menuItem.min)
                local fill = Instance.new("Frame")
                fill.Name = "Fill"
                fill.BackgroundColor3 = Palette.MenuAccent
                fill.BorderSizePixel = 0
                fill.Size = UDim2.new(pct, 0, 1, 0)
                fill.Parent = track
                Instance.new("UICorner", fill).CornerRadius = UDim.new(0, 3)
                
                local dragging = false
                track.InputBegan:Connect(function(input)
                    if input.UserInputType == Enum.UserInputType.MouseButton1 then
                        dragging = true
                    end
                end)
                track.InputEnded:Connect(function(input)
                    if input.UserInputType == Enum.UserInputType.MouseButton1 then
                        dragging = false
                    end
                end)
                
                Connections["slider_" .. menuItem.key] = RunService.RenderStepped:Connect(function()
                    if dragging then
                        local mx = UserInputService:GetMouseLocation().X
                        local tx = track.AbsolutePosition.X
                        local tw = track.AbsoluteSize.X
                        local p = math.clamp((mx - tx) / tw, 0, 1)
                        local v = menuItem.min + p * (menuItem.max - menuItem.min)
                        v = math.floor(v / menuItem.step + 0.5) * menuItem.step
                        Config[menuItem.key] = math.clamp(v, menuItem.min, menuItem.max)
                        fill.Size = UDim2.new((Config[menuItem.key] - menuItem.min) / (menuItem.max - menuItem.min), 0, 1, 0)
                        valLabel.Text = menuItem.step < 1 and string.format("%.2f", Config[menuItem.key]) or tostring(math.floor(Config[menuItem.key]))
                    end
                end)
                
            elseif menuItem.type == "dropdown" then
                local valLabel = Instance.new("TextLabel")
                valLabel.Name = "Value"
                valLabel.BackgroundTransparency = 1
                valLabel.Position = UDim2.new(1, -80, 0, 0)
                valLabel.Size = UDim2.new(0, 75, 1, 0)
                valLabel.Font = Enum.Font.RobotoMono
                valLabel.TextSize = 11
                valLabel.TextColor3 = Palette.MenuAccent
                valLabel.TextXAlignment = Enum.TextXAlignment.Right
                valLabel.Text = "[" .. Config[menuItem.key] .. "]"
                valLabel.Parent = item
                
                local idx = 1
                for i, opt in ipairs(menuItem.options) do
                    if opt == Config[menuItem.key] then idx = i break end
                end
                
                local btn = Instance.new("TextButton")
                btn.BackgroundTransparency = 1
                btn.Size = UDim2.new(1, 0, 1, 0)
                btn.Text = ""
                btn.Parent = item
                
                btn.MouseButton1Click:Connect(function()
                    idx = idx % #menuItem.options + 1
                    Config[menuItem.key] = menuItem.options[idx]
                    valLabel.Text = "[" .. Config[menuItem.key] .. "]"
                end)
            end
            
            GUI.Items[#GUI.Items + 1] = item
        end
    end
    
    local totalH = 0
    for _, item in ipairs(GUI.Items) do
        totalH = totalH + item.AbsoluteSize.Y + 2
    end
    GUI.ContentFrame.CanvasSize = UDim2.new(0, 0, 0, totalH)
end

function GUI.Step()
    if GUI.Dragging then
        local mouse = UserInputService:GetMouseLocation()
        local newPos = mouse - GUI.DragOffset
        GUI.Frame.Position = UDim2.new(0, newPos.X, 0, newPos.Y)
    end
end

local function Unload()
    if State.Unloaded then return end
    State.Unloaded = true
    
    for _, conn in pairs(Connections) do
        pcall(function() conn:Disconnect() end)
    end
    
    for _, esp in pairs(ESP.cache) do ESP.Destroy(esp) end
    Chams.ClearAll()
    
    if Noclip.Connection then pcall(function() Noclip.Connection:Disconnect() end) end
    
    pcall(function() UI.ScreenGui:Destroy() end)
    pcall(function()
        Lighting.Brightness = OriginalLighting.Brightness
        Lighting.Ambient = OriginalLighting.Ambient
    end)
end

Connections.inputDown = UserInputService.InputBegan:Connect(function(input, gp)
    if input.KeyCode == Enum.KeyCode.Home then Unload() return end
    if input.KeyCode == Enum.KeyCode.Insert and not gp then
        Config.MENU_Open = not Config.MENU_Open
        if GUI.Frame then GUI.Frame.Visible = Config.MENU_Open end
        return
    end
    if input.UserInputType == Enum.UserInputType.MouseButton2 then State.Aiming = true end
end)

Connections.inputUp = UserInputService.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton2 then State.Aiming = false end
    if input.UserInputType == Enum.UserInputType.MouseButton1 then GUI.Dragging = false end
end)

Connections.render = RunService.RenderStepped:Connect(function()
    if State.Unloaded then return end
    
    if Config.ESP_Rainbow then State.RainbowHue = (State.RainbowHue + 0.002) % 1 end
    
    local cam = Workspace.CurrentCamera
    if not cam then return end
    local screenSize = cam.ViewportSize
    local screenCenter = Vector2.new(screenSize.X / 2, screenSize.Y / 2)
    
    pcall(ApplyMisc)
    pcall(Noclip.Step)
    pcall(function() ESP.Step(cam, screenSize) end)
    pcall(Chams.Step)
    pcall(function() UpdateRadar(cam) end)
    pcall(function() Aimbot.Step(cam, screenCenter) end)
    pcall(GUI.Step)
end)

GUI.Create()
GUI.UpdateTabs()

Features & Information

(NOT FOR MOBILE PC ONLY) FOR THE GAME FRONTLINES . THIS VERSION IS COMPATIBLE WITH XENO. Since this is made for xeno some features are dumbed down. This is open source, so you can always make your own. ESP: Boxes Names Distance Tracers Dead Check (Marks bodies with X) Chams (Solid / Outline) Team Check Custom Colors & Rainbow Radar: Clean Square Design Shows enemies & dead players Draggable Layout (Move anywhere) Configurable Size & Range Aimbot: RMB Aimbot (Bindable) FOV Circle Smoothing Smart "Auto" Targeting Sticky Targeting Proximity Priority Dynamic Deadzones Team Check Misc: Full Bright Panic Key
#xeno#frontlines#aim#esp#source

Community Comments (7)

BormirBormirNov 30, 2025

what games is it supported in I tried a lot of games and it still doesn't work?

Replying to @Bormir
leetleetNov 30, 2025(edited)

@Bormir this is for the game Frontlines remove the spaces in this link or search it up: https :// www.roblox. com/games/5938036553/FRONTLINES

Replying to @leet
BormirBormirDec 3, 2025

@leet alr ty

Replying to @leet
BormirBormirDec 3, 2025

@leet can you make the aimbot stronger and maybe make it universal

Replying to @Bormir
leetleetDec 4, 2025

@Bormir i am currently cooking something even better

Replying to @leet
BormirBormirDec 4, 2025

@leet alr

wavydemisewavydemiseJan 8, 2026

i dont think the aimbot works anymore.

More Scripts for FRONTLINES