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


-- ============================================================
-- DEADLINE HUB | ESP + Silent Aim + Anti-Aim + Third Person + HitSound
-- Place ID: 12144402492
-- UI: Orion Library
-- ============================================================

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 CoreGui = game:GetService("CoreGui")
local SoundService = game:GetService("SoundService")
local Camera = Workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()

-- ============================================================
-- ORION UI
-- ============================================================
local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/Qanuir/orion-ui/refs/heads/main/source.lua"))()

local Window = OrionLib:MakeWindow({
    Name = "Deadline Hub | RECOIL",
    HidePremium = false,
    SaveConfig = true,
    ConfigFolder = "DeadlineHub",
    IntroEnabled = true,
    IntroText = "Deadline Hub",
    IntroIcon = "rbxassetid://4483345998"
})

-- ============================================================
-- КОНФИГ
-- ============================================================
local Config = {
    ESP = {
        Enabled = false,
        Box = false,
        HealthBar = false,
        Name = false,
        Distance = false,
        TeamCheck = false,
        MaxDistance = 1000,
        BoxColor = Color3.fromRGB(255, 255, 255),
        BoxTransparency = 0.5,
        BoxThickness = 1,
        HealthBarColor = Color3.fromRGB(0, 255, 0),
        NameColor = Color3.fromRGB(255, 255, 255),
        TextSize = 14,
        FillBox = false,
        FillTransparency = 0.7,
        Tracer = false,
        TracerColor = Color3.fromRGB(255, 0, 0),
    },
    SilentAim = {
        Enabled = false,
        Keybind = Enum.KeyCode.Q,
        FOV = 150,
        FOVVisible = true,
        FOVColor = Color3.fromRGB(255, 0, 0),
        TargetPart = "Head",
        TeamCheck = false,
        WallCheck = false,
        HitChance = 100,
        IgnoreDead = true,
        Prediction = { Enabled = true, Amount = 0.165 },
        RandomizeOffset = true,
    },
    Aimbot = {
        Enabled = false,
        Keybind = Enum.KeyCode.E,
        Smoothness = 0.2,
        FOV = 100,
        FOVVisible = false,
        FOVColor = Color3.fromRGB(255, 255, 255),
        TargetPart = "Head",
        TeamCheck = false,
        WallCheck = false,
    },
    AntiAim = {
        Enabled = false,
        Mode = "Spinbot",
        SpinSpeed = 15,
        JitterAmount = 90,
        JitterSpeed = 20,
        FakeAngle = 180,
    },
    ThirdPerson = {
        Enabled = false,
        Distance = 15,
        Height = 2,
        Smoothness = 0.15,
    },
    World = {
        Fullbright = false,
        NoFog = false,
        ClockTime = 14,
    },
    HitSound = {
        Enabled = true,
        Volume = 1,
        Pitch = 1,
        SoundId = "rbxassetid://8255306220",
        Cooldown = 0.1,
        LastPlayed = 0,
        HeadshotPitch = true,
        Sounds = {
            ["TF2 Crit"] = "rbxassetid://8255306220",
            ["Headshot Ding"] = "rbxassetid://6111738677",
            ["Quake Hit"] = "rbxassetid://1455817260",
            ["Smash Heavy"] = "rbxassetid://6324692247",
            ["CSGO Headshot"] = "rbxassetid://8904888220",
            ["Mega Knight"] = "rbxassetid://1310127925561718",
            ["Katana Slice"] = "rbxassetid://7122613461",
            ["Glass Shatter"] = "rbxassetid://13195822712",
            ["Kick Impact"] = "rbxassetid://621557962",
            ["Laser Shot"] = "rbxassetid://130791043",
            ["OOF"] = "rbxassetid://110067101620576",
            ["Vine Boom"] = "rbxassetid://6308606116",
        }
    }
}

-- ============================================================
-- СОСТОЯНИЕ
-- ============================================================
local State = {
    ESPObjects = {},
    FOVCircle = nil,
    FOVCircleAim = nil,
    SilentTarget = nil,
    AimTarget = nil,
    SpinAngle = 0,
    JitterAngle = 0,
    OriginalLighting = {},
    CameraConnection = nil,
}

for _, prop in ipairs({"Ambient", "OutdoorAmbient", "Brightness", "ClockTime", "FogStart", "FogEnd", "FogColor"}) do
    State.OriginalLighting[prop] = Lighting[prop]
end

-- ============================================================
-- HITSOUND ОБЪЕКТ
-- ============================================================
local hitSoundObj = Instance.new("Sound")
hitSoundObj.Name = "DeadlineHitSound"
hitSoundObj.Volume = Config.HitSound.Volume
hitSoundObj.Pitch = Config.HitSound.Pitch
hitSoundObj.SoundId = Config.HitSound.SoundId
hitSoundObj.Parent = SoundService

local function PlayHitSound(headshot)
    if not Config.HitSound.Enabled then return end
    local now = tick()
    if now - Config.HitSound.LastPlayed < Config.HitSound.Cooldown then return end
    Config.HitSound.LastPlayed = now
    
    if headshot and Config.HitSound.HeadshotPitch then
        hitSoundObj.Pitch = Config.HitSound.Pitch * 1.15
    else
        hitSoundObj.Pitch = Config.HitSound.Pitch
    end
    hitSoundObj.Volume = Config.HitSound.Volume
    
    if hitSoundObj.IsPlaying then
        hitSoundObj:Stop()
    end
    hitSoundObj:Play()
end

-- ============================================================
-- УТИЛИТЫ
-- ============================================================
local function IsMobile()
    return UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled
end

local function GetCursorPosition()
    if IsMobile() then
        return Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
    end
    return UserInputService:GetMouseLocation()
end

local function IsAlive(character)
    if not character or not character:IsDescendantOf(Workspace) then return false end
    local hum = character:FindFirstChildOfClass("Humanoid")
    return hum and hum.Health > 0
end

local function GetTargetPart(character, partName)
    if not character then return nil end
    return character:FindFirstChild(partName)
        or character:FindFirstChild("Head")
        or character:FindFirstChild("HumanoidRootPart")
end

local function IsVisible(targetPart, targetChar)
    if not targetPart then return false end
    local myChar = LocalPlayer.Character
    if not myChar then return false end
    local params = RaycastParams.new()
    params.FilterType = Enum.RaycastFilterType.Exclude
    params.FilterDescendantsInstances = {myChar, Camera, targetChar}
    local result = Workspace:Raycast(Camera.CFrame.Position, targetPart.Position - Camera.CFrame.Position, params)
    return result == nil or result.Instance:IsDescendantOf(targetChar)
end

local function WorldToScreen(pos)
    local screen, onScreen = Camera:WorldToViewportPoint(pos)
    return Vector2.new(screen.X, screen.Y), onScreen
end

-- ============================================================
-- ОТСЛЕЖИВАНИЕ ПОПАДАНИЙ (HITSOUND)
-- ============================================================
local TrackedHumans = {}

local function TrackHumanoid(humanoid)
    if TrackedHumans[humanoid] then return end
    TrackedHumans[humanoid] = true
    local lastHealth = humanoid.Health
    
    humanoid:GetPropertyChangedSignal("Health"):Connect(function()
        local newHealth = humanoid.Health
        if newHealth < lastHealth then
            local damage = lastHealth - newHealth
            local char = humanoid.Parent
            local part = char and char:FindFirstChild("Head")
            
            if part then
                local cursor = GetCursorPosition()
                local screen, onScreen = Camera:WorldToViewportPoint(part.Position)
                if onScreen then
                    local dist = (Vector2.new(screen.X, screen.Y) - cursor).Magnitude
                    if dist < Config.SilentAim.FOV then
                        local isHeadshot = damage >= 30
                        PlayHitSound(isHeadshot)
                    end
                end
            end
        end
        lastHealth = newHealth
    end)
end

local function SetupHitDetection(player)
    if player == LocalPlayer then return end
    local function onChar(char)
        local hum = char:WaitForChild("Humanoid", 5)
        if hum then TrackHumanoid(hum) end
    end
    if player.Character then onChar(player.Character) end
    player.CharacterAdded:Connect(onChar)
end

for _, p in ipairs(Players:GetPlayers()) do SetupHitDetection(p) end
Players.PlayerAdded:Connect(SetupHitDetection)

-- ============================================================
-- ESP
-- ============================================================
local ESP = { Objects = {} }

function ESP:Create(player)
    if player == LocalPlayer or self.Objects[player] then return end
    local o = {
        Box = Drawing.new("Square"),
        BoxFill = Drawing.new("Square"),
        HealthBar = Drawing.new("Square"),
        HealthBarFill = Drawing.new("Square"),
        Name = Drawing.new("Text"),
        Distance = Drawing.new("Text"),
        Tracer = Drawing.new("Line"),
    }
    o.Box.Filled = false
    o.BoxFill.Filled = true
    o.HealthBar.Filled = true
    o.HealthBar.Color = Color3.fromRGB(0, 0, 0)
    o.HealthBar.Transparency = 0.3
    o.HealthBarFill.Filled = true
    o.Name.Center = true
    o.Name.Outline = true
    o.Distance.Center = true
    o.Distance.Outline = true
    o.Tracer.Thickness = 1
    o.Tracer.Transparency = 0.5
    self.Objects[player] = o
end

function ESP:Remove(player)
    local o = self.Objects[player]
    if not o then return end
    for _, obj in pairs(o) do
        if obj and obj.Remove then obj:Remove() end
    end
    self.Objects[player] = nil
end

function ESP:Update(player)
    local o = self.Objects[player]
    if not o then return end
    local char = player.Character
    local hum = char and char:FindFirstChildOfClass("Humanoid")
    local hrp = char and char:FindFirstChild("HumanoidRootPart")
    
    if not Config.ESP.Enabled or not char or not hum or not hrp or hum.Health <= 0
       or (Config.ESP.TeamCheck and player.Team == LocalPlayer.Team) then
        for _, obj in pairs(o) do if obj then obj.Visible = false end end
        return
    end
    
    local dist = (Camera.CFrame.Position - hrp.Position).Magnitude
    if dist > Config.ESP.MaxDistance then
        for _, obj in pairs(o) do if obj then obj.Visible = false end end
        return
    end
    
    local headPos = char:FindFirstChild("Head") and char.Head.Position or hrp.Position
    local bottomPos = hrp.Position - Vector3.new(0, 3, 0)
    local headScreen, headOn = WorldToScreen(headPos)
    local bottomScreen, bottomOn = WorldToScreen(bottomPos)
    
    if not headOn and not bottomOn then
        for _, obj in pairs(o) do if obj then obj.Visible = false end end
        return
    end
    
    local height = math.abs(headScreen.Y - bottomScreen.Y)
    local width = height * 0.5
    local cx = (headScreen.X + bottomScreen.X) / 2
    local topY = math.min(headScreen.Y, bottomScreen.Y)
    
    o.Box.Visible = Config.ESP.Box
    o.Box.Size = Vector2.new(width, height)
    o.Box.Position = Vector2.new(cx - width/2, topY)
    o.Box.Color = Config.ESP.BoxColor
    o.Box.Transparency = Config.ESP.BoxTransparency
    o.Box.Thickness = Config.ESP.BoxThickness
    
    o.BoxFill.Visible = Config.ESP.FillBox
    o.BoxFill.Size = o.Box.Size
    o.BoxFill.Position = o.Box.Position
    o.BoxFill.Color = Config.ESP.BoxColor
    o.BoxFill.Transparency = Config.ESP.FillTransparency
    
    local hp = hum.Health / hum.MaxHealth
    o.HealthBar.Visible = Config.ESP.HealthBar
    o.HealthBar.Size = Vector2.new(3, height)
    o.HealthBar.Position = Vector2.new(cx - width/2 - 5, topY)
    o.HealthBarFill.Visible = Config.ESP.HealthBar
    o.HealthBarFill.Size = Vector2.new(3, height * hp)
    o.HealthBarFill.Position = Vector2.new(cx - width/2 - 5, topY + height * (1 - hp))
    o.HealthBarFill.Color = Config.ESP.HealthBarColor
    
    o.Name.Visible = Config.ESP.Name
    o.Name.Position = Vector2.new(cx, topY - 16)
    o.Name.Text = player.Name
    o.Name.Size = Config.ESP.TextSize
    o.Name.Color = Config.ESP.NameColor
    
    o.Distance.Visible = Config.ESP.Distance
    o.Distance.Position = Vector2.new(cx, topY + height + 2)
    o.Distance.Text = string.format("[%d]", math.floor(dist))
    o.Distance.Size = Config.ESP.TextSize - 2
    o.Distance.Color = Config.ESP.NameColor
    
    o.Tracer.Visible = Config.ESP.Tracer
    o.Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
    o.Tracer.To = Vector2.new(cx, topY + height/2)
    o.Tracer.Color = Config.ESP.TracerColor
end

for _, p in ipairs(Players:GetPlayers()) do ESP:Create(p) end
Players.PlayerAdded:Connect(function(p) ESP:Create(p) end)
Players.PlayerRemoving:Connect(function(p) ESP:Remove(p) end)

-- ============================================================
-- SILENT AIM
-- ============================================================
local SilentAim = {}

function SilentAim:GetTarget()
    local cursor = GetCursorPosition()
    local closest, closestDist = nil, Config.SilentAim.FOV
    for _, player in ipairs(Players:GetPlayers()) do
        if player == LocalPlayer then continue end
        local char = player.Character
        if not IsAlive(char) then continue end
        local hum = char:FindFirstChildOfClass("Humanoid")
        if Config.SilentAim.IgnoreDead and hum.Health <= 0 then continue end
        if Config.SilentAim.TeamCheck and player.Team == LocalPlayer.Team then continue end
        local part = GetTargetPart(char, Config.SilentAim.TargetPart)
        if not part then continue end
        if Config.SilentAim.WallCheck and not IsVisible(part, char) then continue end
        local screen, onScreen = WorldToScreen(part.Position)
        if not onScreen then continue end
        local d = (screen - cursor).Magnitude
        if d < closestDist then
            closestDist = d
            closest = { part = part, character = char, player = player }
        end
    end
    return closest
end

local mt = getrawmetatable(game)
local oldNamecall = mt.__namecall
setreadonly(mt, false)

mt.__namecall = newcclosure(function(self, ...)
    local method = getnamecallmethod()
    local args = {...}
    if Config.SilentAim.Enabled and method == "Raycast" and self == Workspace then
        if State.SilentTarget and State.SilentTarget.part then
            if Config.SilentAim.HitChance < 100 and math.random(1, 100) > Config.SilentAim.HitChance then
                return oldNamecall(self, ...)
            end
            local targetPos = State.SilentTarget.part.Position
            if Config.SilentAim.Prediction.Enabled then
                local hrp = State.SilentTarget.character:FindFirstChild("HumanoidRootPart")
                if hrp then
                    targetPos = targetPos + hrp.AssemblyLinearVelocity * Config.SilentAim.Prediction.Amount
                end
            end
            if Config.SilentAim.RandomizeOffset then
                targetPos = targetPos + Vector3.new(
                    (math.random() - 0.5) * 0.1,
                    (math.random() - 0.5) * 0.1,
                    (math.random() - 0.5) * 0.1
                )
            end
            if args[2] and typeof(args[2]) == "Vector3" then
                local origin = args[1] or Camera.CFrame.Position
                args[2] = (targetPos - origin).Unit * args[2].Magnitude
                return oldNamecall(self, unpack(args))
            end
        end
    end
    return oldNamecall(self, ...)
end)

setreadonly(mt, true)

-- ============================================================
-- AIMBOT
-- ============================================================
local Aimbot = {}

function Aimbot:GetTarget()
    local cursor = GetCursorPosition()
    local closest, closestDist = nil, Config.Aimbot.FOV
    for _, player in ipairs(Players:GetPlayers()) do
        if player == LocalPlayer then continue end
        local char = player.Character
        if not IsAlive(char) then continue end
        if Config.Aimbot.TeamCheck and player.Team == LocalPlayer.Team then continue end
        local part = GetTargetPart(char, Config.Aimbot.TargetPart)
        if not part then continue end
        if Config.Aimbot.WallCheck and not IsVisible(part, char) then continue end
        local screen, onScreen = WorldToScreen(part.Position)
        if not onScreen then continue end
        local d = (screen - cursor).Magnitude
        if d < closestDist then
            closestDist = d
            closest = { part = part, character = char }
        end
    end
    return closest
end

function Aimbot:Update(dt)
    if not Config.Aimbot.Enabled or not UserInputService:IsKeyDown(Config.Aimbot.Keybind) then
        State.AimTarget = nil
        return
    end
    local target = self:GetTarget()
    if not target then State.AimTarget = nil return end
    State.AimTarget = target
    local lookAt = CFrame.new(Camera.CFrame.Position, target.part.Position)
    Camera.CFrame = Camera.CFrame:Lerp(lookAt, Config.Aimbot.Smoothness)
end

-- ============================================================
-- ANTI-AIM
-- ============================================================
local AntiAim = {}

function AntiAim:Update(dt)
    if not Config.AntiAim.Enabled then return end
    local char = LocalPlayer.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end
    
    if Config.AntiAim.Mode == "Spinbot" then
        State.SpinAngle = (State.SpinAngle + Config.AntiAim.SpinSpeed * dt * 60) % 360
        hrp.CFrame = CFrame.new(hrp.Position) * CFrame.Angles(0, math.rad(State.SpinAngle), 0)
    elseif Config.AntiAim.Mode == "Jitter" then
        State.JitterAngle = math.sin(tick() * Config.AntiAim.JitterSpeed) * Config.AntiAim.JitterAmount
        hrp.CFrame = CFrame.new(hrp.Position) * CFrame.Angles(0, math.rad(State.JitterAngle), 0)
    elseif Config.AntiAim.Mode == "FakeAngle" then
        hrp.CFrame = CFrame.new(hrp.Position) * CFrame.Angles(0, math.rad(Config.AntiAim.FakeAngle), 0)
    end
end

-- ============================================================
-- THIRD PERSON
-- ============================================================
local ThirdPerson = {}

function ThirdPerson:Apply()
    if not Config.ThirdPerson.Enabled then
        if State.CameraConnection then
            State.CameraConnection:Disconnect()
            State.CameraConnection = nil
        end
        return
    end
    if State.CameraConnection then return end
    State.CameraConnection = RunService.RenderStepped:Connect(function()
        local char = LocalPlayer.Character
        if not char then return end
        local hrp = char:FindFirstChild("HumanoidRootPart")
        if not hrp then return end
        local targetPos = hrp.Position + Vector3.new(0, Config.ThirdPerson.Height, 0)
        local offset = Camera.CFrame.LookVector * -Config.ThirdPerson.Distance
        Camera.CFrame = Camera.CFrame:Lerp(
            CFrame.new(targetPos + offset, targetPos),
            Config.ThirdPerson.Smoothness
        )
    end)
end

-- ============================================================
-- WORLD
-- ============================================================
local function ApplyWorld()
    if Config.World.Fullbright then
        Lighting.Ambient = Color3.fromRGB(255, 255, 255)
        Lighting.OutdoorAmbient = Color3.fromRGB(255, 255, 255)
        Lighting.Brightness = 3
        Lighting.GlobalShadows = false
    else
        Lighting.Ambient = State.OriginalLighting.Ambient
        Lighting.OutdoorAmbient = State.OriginalLighting.OutdoorAmbient
        Lighting.Brightness = State.OriginalLighting.Brightness
    end
    if Config.World.NoFog then
        Lighting.FogEnd = 100000
        Lighting.FogStart = 100000
    end
    Lighting.ClockTime = Config.World.ClockTime
end

-- ============================================================
-- FOV CIRCLES
-- ============================================================
local function UpdateFOV()
    if not State.FOVCircle then
        State.FOVCircle = Drawing.new("Circle")
        State.FOVCircle.NumSides = 64
        State.FOVCircle.Filled = false
        State.FOVCircle.Thickness = 1
    end
    State.FOVCircle.Visible = Config.SilentAim.FOVVisible and Config.SilentAim.Enabled
    State.FOVCircle.Radius = Config.SilentAim.FOV
    State.FOVCircle.Color = Config.SilentAim.FOVColor
    State.FOVCircle.Transparency = 0.5
    State.FOVCircle.Position = GetCursorPosition()
    
    if not State.FOVCircleAim then
        State.FOVCircleAim = Drawing.new("Circle")
        State.FOVCircleAim.NumSides = 64
        State.FOVCircleAim.Filled = false
        State.FOVCircleAim.Thickness = 1
    end
    State.FOVCircleAim.Visible = Config.Aimbot.FOVVisible and Config.Aimbot.Enabled
    State.FOVCircleAim.Radius = Config.Aimbot.FOV
    State.FOVCircleAim.Color = Config.Aimbot.FOVColor
    State.FOVCircleAim.Transparency = 0.5
    State.FOVCircleAim.Position = GetCursorPosition()
end

-- ============================================================
-- ГЛАВНЫЙ ЦИКЛ
-- ============================================================
RunService.RenderStepped:Connect(function(dt)
    for player, _ in pairs(ESP.Objects) do
        ESP:Update(player)
    end
    if Config.SilentAim.Enabled then
        State.SilentTarget = SilentAim:GetTarget()
    else
        State.SilentTarget = nil
    end
    Aimbot:Update(dt)
    AntiAim:Update(dt)
    UpdateFOV()
    ApplyWorld()
end)

-- ============================================================
-- UI: ESP TAB
-- ============================================================
local ESPTab = Window:MakeTab({ Name = "ESP", Icon = "rbxassetid://4483345998" })
ESPTab:AddSection({ Name = "Основные" })

ESPTab:AddToggle({ Name = "Включить ESP", Default = false, Flag = "ESP_Enabled", Save = true,
    Callback = function(v) Config.ESP.Enabled = v end })
ESPTab:AddToggle({ Name = "Боксы", Default = false, Flag = "ESP_Box", Save = true,
    Callback = function(v) Config.ESP.Box = v end })
ESPTab:AddToggle({ Name = "Заполнение боксов", Default = false, Flag = "ESP_Fill", Save = true,
    Callback = function(v) Config.ESP.FillBox = v end })
ESPTab:AddToggle({ Name = "Полоса HP", Default = false, Flag = "ESP_HP", Save = true,
    Callback = function(v) Config.ESP.HealthBar = v end })
ESPTab:AddToggle({ Name = "Имена", Default = false, Flag = "ESP_Name", Save = true,
    Callback = function(v) Config.ESP.Name = v end })
ESPTab:AddToggle({ Name = "Дистанция", Default = false, Flag = "ESP_Dist", Save = true,
    Callback = function(v) Config.ESP.Distance = v end })
ESPTab:AddToggle({ Name = "Трассеры", Default = false, Flag = "ESP_Tracer", Save = true,
    Callback = function(v) Config.ESP.Tracer = v end })
ESPTab:AddToggle({ Name = "Team Check", Default = false, Flag = "ESP_Team", Save = true,
    Callback = function(v) Config.ESP.TeamCheck = v end })

ESPTab:AddSection({ Name = "Кастомизация" })
ESPTab:AddSlider({ Name = "Макс. дистанция", Min = 100, Max = 5000, Default = 1000, Increment = 100,
    ValueName = "studs", Flag = "ESP_MaxDist", Save = true,
    Callback = function(v) Config.ESP.MaxDistance = v end })
ESPTab:AddSlider({ Name = "Прозрачность", Min = 0, Max = 1, Default = 0.5, Increment = 0.05,
    ValueName = "", Flag = "ESP_Trans", Save = true,
    Callback = function(v) Config.ESP.BoxTransparency = v end })
ESPTab:AddSlider({ Name = "Толщина", Min = 1, Max = 5, Default = 1, Increment = 1,
    ValueName = "px", Flag = "ESP_Thick", Save = true,
    Callback = function(v) Config.ESP.BoxThickness = v end })
ESPTab:AddSlider({ Name = "Размер текста", Min = 8, Max = 30, Default = 14, Increment = 1,
    ValueName = "", Flag = "ESP_TextSize", Save = true,
    Callback = function(v) Config.ESP.TextSize = v end })
ESPTab:AddColorpicker({ Name = "Цвет бокса", Default = Color3.fromRGB(255, 255, 255), Flag = "ESP_BoxColor", Save = true,
    Callback = function(v) Config.ESP.BoxColor = v end })
ESPTab:AddColorpicker({ Name = "Цвет имени", Default = Color3.fromRGB(255, 255, 255), Flag = "ESP_NameColor", Save = true,
    Callback = function(v) Config.ESP.NameColor = v end })
ESPTab:AddColorpicker({ Name = "Цвет трассера", Default = Color3.fromRGB(255, 0, 0), Flag = "ESP_TracerColor", Save = true,
    Callback = function(v) Config.ESP.TracerColor = v end })

-- ============================================================
-- UI: SILENT AIM TAB
-- ============================================================
local STab = Window:MakeTab({ Name = "Silent Aim", Icon = "rbxassetid://4483345998" })
STab:AddSection({ Name = "Основные" })

STab:AddToggle({ Name = "Включить Silent Aim", Default = false, Flag = "SA_Enabled", Save = true,
    Callback = function(v) Config.SilentAim.Enabled = v end })
STab:AddBind({ Name = "Клавиша (ПК)", Default = Enum.KeyCode.Q, Flag = "SA_Key", Save = true,
    Callback = function(v) Config.SilentAim.Keybind = v end })
STab:AddDropdown({ Name = "Часть тела",
    Options = {"Head", "HumanoidRootPart", "UpperTorso", "LowerTorso"},
    Default = "Head", Flag = "SA_Part", Save = true,
    Callback = function(v) Config.SilentAim.TargetPart = v end })
STab:AddToggle({ Name = "Team Check", Default = false, Flag = "SA_Team", Save = true,
    Callback = function(v) Config.SilentAim.TeamCheck = v end })
STab:AddToggle({ Name = "Wall Check", Default = false, Flag = "SA_Wall", Save = true,
    Callback = function(v) Config.SilentAim.WallCheck = v end })
STab:AddToggle({ Name = "Игнорировать мёртвых", Default = true, Flag = "SA_IgnoreDead", Save = true,
    Callback = function(v) Config.SilentAim.IgnoreDead = v end })
STab:AddSlider({ Name = "FOV", Min = 10, Max = 800, Default = 150, Increment = 10,
    ValueName = "px", Flag = "SA_FOV", Save = true,
    Callback = function(v) Config.SilentAim.FOV = v end })
STab:AddToggle({ Name = "Показывать FOV", Default = true, Flag = "SA_FOVVis", Save = true,
    Callback = function(v) Config.SilentAim.FOVVisible = v end })
STab:AddSlider({ Name = "Hit Chance", Min = 1, Max = 100, Default = 100, Increment = 1,
    ValueName = "%", Flag = "SA_Hit", Save = true,
    Callback = function(v) Config.SilentAim.HitChance = v end })
STab:AddToggle({ Name = "Randomize Offset", Default = true, Flag = "SA_RandOffset", Save = true,
    Callback = function(v) Config.SilentAim.RandomizeOffset = v end })

STab:AddSection({ Name = "Prediction" })
STab:AddToggle({ Name = "Включить Prediction", Default = true, Flag = "SA_Pred", Save = true,
    Callback = function(v) Config.SilentAim.Prediction.Enabled = v end })
STab:AddSlider({ Name = "Сила предсказания", Min = 0.01, Max = 1, Default = 0.165, Increment = 0.01,
    ValueName = "", Flag = "SA_PredAmt", Save = true,
    Callback = function(v) Config.SilentAim.Prediction.Amount = v end })

-- ============================================================
-- UI: AIMBOT TAB
-- ============================================================
local ATab = Window:MakeTab({ Name = "Aimbot", Icon = "rbxassetid://4483345998" })
ATab:AddSection({ Name = "Основные" })

ATab:AddToggle({ Name = "Включить Aimbot", Default = false, Flag = "Aim_Enabled", Save = true,
    Callback = function(v) Config.Aimbot.Enabled = v end })
ATab:AddBind({ Name = "Клавиша", Default = Enum.KeyCode.E, Flag = "Aim_Key", Save = true,
    Callback = function(v) Config.Aimbot.Keybind = v end })
ATab:AddDropdown({ Name = "Часть тела",
    Options = {"Head", "HumanoidRootPart", "UpperTorso", "LowerTorso"},
    Default = "Head", Flag = "Aim_Part", Save = true,
    Callback = function(v) Config.Aimbot.TargetPart = v end })
ATab:AddToggle({ Name = "Team Check", Default = false, Flag = "Aim_Team", Save = true,
    Callback = function(v) Config.Aimbot.TeamCheck = v end })
ATab:AddToggle({ Name = "Wall Check", Default = false, Flag = "Aim_Wall", Save = true,
    Callback = function(v) Config.Aimbot.WallCheck = v end })
ATab:AddSlider({ Name = "FOV", Min = 10, Max = 500, Default = 100, Increment = 5,
    ValueName = "px", Flag = "Aim_FOV", Save = true,
    Callback = function(v) Config.Aimbot.FOV = v end })
ATab:AddSlider({ Name = "Плавность", Min = 0.01, Max = 1, Default = 0.2, Increment = 0.01,
    ValueName = "", Flag = "Aim_Smooth", Save = true,
    Callback = function(v) Config.Aimbot.Smoothness = v end })
ATab:AddToggle({ Name = "Показывать FOV", Default = false, Flag = "Aim_FOVVis", Save = true,
    Callback = function(v) Config.Aimbot.FOVVisible = v end })

-- ============================================================
-- UI: ANTI-AIM TAB
-- ============================================================
local AATab = Window:MakeTab({ Name = "Anti-Aim", Icon = "rbxassetid://4483345998" })
AATab:AddSection({ Name = "Основные" })

AATab:AddToggle({ Name = "Включить Anti-Aim", Default = false, Flag = "AA_Enabled", Save = true,
    Callback = function(v) Config.AntiAim.Enabled = v end })
AATab:AddDropdown({ Name = "Режим",
    Options = {"Spinbot", "Jitter", "FakeAngle"},
    Default = "Spinbot", Flag = "AA_Mode", Save = true,