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


-- ============================================================
-- DEADLINE HUB | ESP + Silent Aim + Anti-Aim + Third Person + HitSound
-- UI: PealLib (8 тем включая Fatality)
-- ============================================================

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

-- ============================================================
-- ЗАГРУЗКА PEALLIB (темы: Fatality, BBot, Jester, Mint, Tokyo Night, Ubuntu, Quartz, Default)
-- ============================================================
local repo = 'https://raw.githubusercontent.com/pealz1/PealLib/main/'
local Library = loadstring(game:HttpGet(repo .. 'Library.lua'))()
local ThemeManager = loadstring(game:HttpGet(repo .. 'addons/ThemeManager.lua'))()
local SaveManager = loadstring(game:HttpGet(repo .. 'addons/SaveManager.lua'))()

-- ============================================================
-- КОНФИГ
-- ============================================================
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, Cooldown = 0.1, LastPlayed = 0,
        HeadshotPitch = true,
        SoundId = "rbxassetid://8255306220",
        Sounds = {
            ["TF2 Crit"] = "rbxassetid://8255306220",
            ["Headshot Ding"] = "rbxassetid://6111738677",
            ["Quake Hit"] = "rbxassetid://1455817260",
            ["CSGO Headshot"] = "rbxassetid://8904888220",
            ["Mega Knight"] = "rbxassetid://1310127925561718",
            ["Katana Slice"] = "rbxassetid://7122613461",
            ["Glass Shatter"] = "rbxassetid://13195822712",
            ["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
                        PlayHitSound(damage >= 30)
                    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: PEALLIB WINDOW
-- ============================================================
local Window = Library:CreateWindow({
    Title = "Deadline Hub | RECOIL",
    Center = true,
    AutoShow = true,
    TabPadding = 8,
    MenuFadeTime = 0.2
})

-- ============================================================
-- UI: ESP TAB
-- ============================================================
local ESPTab = Window:AddTab("ESP")
local ESPGroup = ESPTab:AddLeftGroupbox("Основные")

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

local ESPCustom = ESPTab:AddRightGroupbox("Кастомизация")
ESPCustom:AddSlider("ESP_MaxDist", { Text = "Макс. дистанция", Default = 1000, Min = 100, Max = 5000, Rounding = 0,
    Callback = function(v) Config.ESP.MaxDistance = v end })
ESPCustom:AddSlider("ESP_Trans", { Text = "Прозрачность", Default = 0.5, Min = 0, Max = 1, Rounding = 2,
    Callback = function(v) Config.ESP.BoxTransparency = v end })
ESPCustom:AddSlider("ESP_Thick", { Text = "Толщина", Default = 1, Min = 1, Max = 5, Rounding = 0,
    Callback = function(v) Config.ESP.BoxThickness = v end })
ESPCustom:AddSlider("ESP_TextSize", { Text = "Размер текста", Default = 14, Min = 8, Max = 30, Rounding = 0,
    Callback = function(v) Config.ESP.TextSize = v end })
ESPCustom:AddLabel("Цвет бокса"):AddColorPicker("ESP_BoxColor", { Default = Color3.fromRGB(255, 255, 255),
    Callback = function(v) Config.ESP.BoxColor = v end })
ESPCustom:AddLabel("Цвет имени"):AddColorPicker("ESP_NameColor", { Default = Color3.fromRGB(255, 255, 255),
    Callback = function(v) Config.ESP.NameColor = v end })
ESPCustom:AddLabel("Цвет трассера"):AddColorPicker("ESP_TracerColor", { Default = Color3.fromRGB(255, 0, 0),
    Callback = function(v) Config.ESP.TracerColor = v end })

-- ============================================================
-- UI: SILENT AIM TAB
-- ============================================================
local STab = Window:AddTab("Silent Aim")
local SGroup = STab:AddLeftGroupbox("Основные")

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

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

-- ============================================================
-- UI: AIMBOT TAB
-- ============================================================
local ATab = Window:AddTab("Aimbot")
local AGroup = ATab:AddLeftGroupbox("Основные")

AGroup:AddToggle("Aim_Enabled", { Text = "Включить Aimbot", Default = false,
    Callback = function(v) Config.Aimbot.Enabled = v end })
AGroup:AddLabel("Клавиша"):AddKeyPicker("Aim_Key", { Default = "E",
    Callback = function(v) Config.Aimbot.Keybind = v end })
AGroup:AddDropdown("Aim_Part", { Text = "Часть тела", Values = {"Head", "HumanoidRootPart", "UpperTorso", "LowerTorso"},
    Default = "Head", Callback = function(v) Config.Aimbot.TargetPart = v end })
AGroup:AddToggle("Aim_Team", { Text = "Team Check", Default = false,
    Callback = function(v) Config.Aimbot.TeamCheck = v end })
AGroup:AddToggle("Aim_Wall", { Text = "Wall Check", Default = false,
    Callback = function(v) Config.Aimbot.WallCheck = v end })
AGroup:AddSlider("Aim_FOV", { Text = "FOV", Default = 100, Min = 10, Max = 500, Rounding = 0,
    Callback = function(v) Config.Aimbot.FOV = v end })
AGroup:AddSlider("Aim_Smooth", { Text = "Плавность", Default = 0.2, Min = 0.01, Max = 1, Rounding = 2,
    Callback = function(v) Config.Aimbot.Smoothness = v end })
AGroup:AddToggle("Aim_FOVVis", { Text = "Показывать FOV", Default = false,
    Callback = function(v) Config.Aimbot.FOVVisible = v end })

-- ============================================================
-- UI: ANTI-AIM TAB
-- ============================================================
local AATab = Window:AddTab("Anti-Aim")
local AAGroup = AATab:AddLeftGroupbox("Основные")

AAGroup:AddToggle("AA_Enabled", { Text = "Включить Anti-Aim", Default = false,
    Callback = function(v) Config.AntiAim.Enabled = v end })
AAGroup:AddDropdown("AA_Mode", { Text = "Режим", Values = {"Spinbot", "Jitter", "FakeAngle"},
    Default = "Spinbot", Callback = function(v) Config.AntiAim.Mode = v end })
AAGroup:AddSlider("AA_SpinSpeed", { Text = "Скорость вращения", Default = 15, Min = 1, Max = 50, Rounding = 0,
    Callback = function(v) Config.AntiAim.SpinSpeed = v end })
AAGroup:AddSlider("AA_JitterAmt", { Text = "Сила дрожания", Default = 90, Min = 10, Max = 180, Rounding = 0,
    Callback = function(v) Config.AntiAim.JitterAmount = v end })
AAGroup:AddSlider("AA_JitterSpeed", { Text = "Скорость дрожания", Default = 20, Min = 5, Max = 60, Rounding = 0,
    Callback = function(v) Config.AntiAim.JitterSpeed = v end })
AAGroup:AddSlider("AA_FakeAngle", { Text = "Угол FakeAngle", Default = 180, Min = 0, Max = 180, Rounding = 0,
    Callback = function(v) Config.AntiAim.FakeAngle = v end })

-- ============================================================
-- UI: THIRD PERSON TAB
-- ============================================================
local TPTab = Window:AddTab("Third Person")
local TPGroup = TPTab:AddLeftGroupbox("Камера")

TPGroup:AddToggle("TP_