deskret9 hub
Key RequiredUniversal

deskret9 hub

Universal Scriptdeskret9deskret9 460 views 3.8K executesUpdated Oct 2, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•960 lines (81869 chars)
-- =====================================================================
-- Deskret9 Hub Pro - V12.1 (No Teleport Edition)
-- Architecture: Bulletproof Globals, Perfect ZIndex, Multi-Lang
-- =====================================================================

if not game:IsLoaded() then game.Loaded:Wait() end
print("🚀 [Deskret9 Hub] Запуск загрузчика...")

-- ==========================================
-- 1. ГЛОБАЛЬНАЯ ТАБЛИЦА СИСТЕМЫ
-- ==========================================
local D9 = {
    Core = {
        Players = game:GetService("Players"),
        RS = game:GetService("RunService"),
        UIS = game:GetService("UserInputService"),
        TS = game:GetService("TweenService"),
        Lighting = game:GetService("Lighting"),
        Http = game:GetService("HttpService"),
        Snd = game:GetService("SoundService"),
        Stats = game:GetService("Stats"),
        Market = game:GetService("MarketplaceService"),
        Pathfinding = game:GetService("PathfindingService"),
        Camera = workspace.CurrentCamera
    },
    Config = {
        Language = "RU", -- RU или EN
        IsFlying = false, CamMode = "None", Noclip = false, XRay = false,
        ESP = false, ESPNames = false, ESPBoxes = false, ESPTracers = false,
        ShadersActive = false, EnforceSpeed = false, IsAwakened = false, 
        Cooldown = false, Minimized = false, FPSBoost1 = false, FPSBoost2 = false,
        AIWalking = false,
        
        FlySpeed = 60, WalkSpeed = 16, JumpPower = 50, Brightness = 0.0,
        AnimIndex = 1, BoostIndex = 1, FTrailIndex = 1, STrailIndex = 1,
        ShaderIndex = 1, FontIndex = 1, Wallpaper = ""
    },
    Cache = {
        Parts = {}, XRayTransparencies = {}, KeysDown = {}, 
        DisabledFX = {}, SavedMaterials = {}, SavedTextures = {},
        VisualPath = {}, AllTextElements = {},
        SpeedObj = {Trail = nil, Att0 = nil, Att1 = nil, Halo = nil, HaloWeld = nil},
        FlyObj = {Attachment = nil, Velocity = nil, Align = nil, DronePart = nil, DroneVel = nil, DroneAlign = nil, Trail = nil, Att0 = nil, Att1 = nil},
        AnimTracks = {Hover = nil, Forward = nil, Boost = nil}
    },
    Theme = {
        BgMain = Color3.fromRGB(15, 17, 23),
        BgSidebar = Color3.fromRGB(18, 20, 26),
        BgPanel = Color3.fromRGB(24, 28, 40),
        BgLight = Color3.fromRGB(35, 40, 55),
        ButtonBase = Color3.fromRGB(30, 33, 44),
        TextWhite = Color3.fromRGB(245, 245, 255),
        TextGray = Color3.fromRGB(140, 150, 170),
        Stroke = Color3.fromRGB(45, 50, 65),
        AccentBlue = Color3.fromRGB(0, 170, 255),
        AccentPurple = Color3.fromRGB(150, 80, 255),
        AccentGreen = Color3.fromRGB(0, 230, 120),
        AccentRed = Color3.fromRGB(255, 65, 85),
        AccentOrange = Color3.fromRGB(255, 130, 0),
        AccentYellow = Color3.fromRGB(255, 210, 40),
        AccentCyan = Color3.fromRGB(0, 240, 200)
    },
    DB = {},
    UI = {},
    Funcs = {}
}

D9.Core.Player = D9.Core.Players.LocalPlayer
while not D9.Core.Player do task.wait(0.1); D9.Core.Player = D9.Core.Players.LocalPlayer end

pcall(function() D9.Core.ExecutorName = identifyexecutor() or "Unknown Executor" end)
pcall(function() D9.Core.SupportsWrite = writefile ~= nil end)
pcall(function() D9.Core.SupportsClipboard = setclipboard ~= nil end)

local function L(ru_text, en_text)
    if D9.Config.Language == "RU" then return ru_text else return en_text end
end

-- ==========================================
-- 2. ВЫБОР ЯЗЫКА (LANGUAGE SELECTION)
-- ==========================================
local TargetGui = pcall(function() return game:GetService("CoreGui") end) and game:GetService("CoreGui") or D9.Core.Player:WaitForChild("PlayerGui")
if TargetGui:FindFirstChild("deskret9_hub_pro") then TargetGui.deskret9_hub_pro:Destroy() end

local LangGui = Instance.new("ScreenGui", TargetGui)
LangGui.Name = "deskret9_hub_pro_lang"
LangGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

local LangFrame = Instance.new("Frame", LangGui)
LangFrame.Size = UDim2.new(1, 0, 1, 0)
LangFrame.BackgroundColor3 = D9.Theme.BgMain
LangFrame.ZIndex = 1000

local LangContainer = Instance.new("Frame", LangFrame)
LangContainer.Size = UDim2.new(0, 300, 0, 200)
LangContainer.Position = UDim2.new(0.5, -150, 0.5, -100)
LangContainer.BackgroundColor3 = D9.Theme.BgPanel
LangContainer.ZIndex = 1001
Instance.new("UICorner", LangContainer).CornerRadius = UDim.new(0, 12)
local LangStroke = Instance.new("UIStroke", LangContainer)
LangStroke.Color = D9.Theme.AccentBlue
LangStroke.Thickness = 2

local LangTitle = Instance.new("TextLabel", LangContainer)
LangTitle.Size = UDim2.new(1, 0, 0, 50)
LangTitle.Position = UDim2.new(0, 0, 0, 10)
LangTitle.BackgroundTransparency = 1
LangTitle.Text = "Select Language\nВыберите язык"
LangTitle.TextColor3 = D9.Theme.TextWhite
LangTitle.Font = Enum.Font.GothamBlack
LangTitle.TextSize = 18
LangTitle.ZIndex = 1002

local BtnEN = Instance.new("TextButton", LangContainer)
BtnEN.Size = UDim2.new(1, -40, 0, 40)
BtnEN.Position = UDim2.new(0, 20, 0, 80)
BtnEN.BackgroundColor3 = D9.Theme.ButtonBase
BtnEN.TextColor3 = D9.Theme.TextWhite
BtnEN.Text = "🇺🇸 English"
BtnEN.Font = Enum.Font.GothamBold
BtnEN.TextSize = 14
BtnEN.ZIndex = 1002
Instance.new("UICorner", BtnEN).CornerRadius = UDim.new(0, 8)
Instance.new("UIStroke", BtnEN).Color = D9.Theme.Stroke

local BtnRU = Instance.new("TextButton", LangContainer)
BtnRU.Size = UDim2.new(1, -40, 0, 40)
BtnRU.Position = UDim2.new(0, 20, 0, 130)
BtnRU.BackgroundColor3 = D9.Theme.ButtonBase
BtnRU.TextColor3 = D9.Theme.TextWhite
BtnRU.Text = "🇷🇺 Русский"
BtnRU.Font = Enum.Font.GothamBold
BtnRU.TextSize = 14
BtnRU.ZIndex = 1002
Instance.new("UICorner", BtnRU).CornerRadius = UDim.new(0, 8)
Instance.new("UIStroke", BtnRU).Color = D9.Theme.Stroke

local SelectedLang = nil
BtnEN.MouseButton1Click:Connect(function() SelectedLang = "EN" end)
BtnRU.MouseButton1Click:Connect(function() SelectedLang = "RU" end)

while SelectedLang == nil do task.wait(0.1) end
D9.Config.Language = SelectedLang
LangGui:Destroy()

-- ==========================================
-- 3. БАЗЫ ДАННЫХ
-- ==========================================
D9.DB.Anims = {
    {name = L("СУПЕРГЕРОЙ", "SUPERHERO"), hover = "507766388", forward = "507777623"},
    {name = L("АКВА", "AQUA"), hover = "507784897", forward = "507785072"},
    {name = L("ПИКИРОВАНИЕ", "DIVE"), hover = "507767714", forward = "507767968"},
    {name = L("НИНДЗЯ", "NINJA"), hover = "656117878", forward = "656118341"},
    {name = L("СПРИНТ В НЕБЕ", "SKY SPRINT"), hover = "507766666", forward = "507767714"},
    {name = L("МЕДИТАЦИЯ", "MEDITATION"), hover = "507776043", forward = "507776879"},
    {name = L("НЕВЕСОМОСТЬ", "ZERO GRAVITY"), hover = "507785072", forward = "507766388"},
    {name = L("ОМНИ", "OMNI"), hover = "1083218792", forward = "1083216690"}
}

D9.DB.Boosts = {
    {name = L("ЗВУКОВОЙ БАРЬЕР", "SONIC BOOM"), id = "1083178339"},
    {name = L("ВЗРЫВНОЙ РЫВОК", "EXPLOSIVE DASH"), id = "1083216690"}
}

D9.DB.FTrails = {
    {name = L("КЛАССИКА", "CLASSIC"), c1 = D9.Theme.AccentBlue, c2 = D9.Theme.AccentPurple},
    {name = L("НЕОН", "NEON"), c1 = D9.Theme.AccentGreen, c2 = D9.Theme.AccentBlue},
    {name = L("ПЛАМЯ", "FLAME"), c1 = D9.Theme.AccentOrange, c2 = D9.Theme.AccentRed},
    {name = L("КИБЕРПАНК", "CYBERPUNK"), c1 = Color3.fromRGB(255, 0, 255), c2 = D9.Theme.AccentCyan},
    {name = L("МАГИЯ", "MAGIC"), c1 = Color3.fromRGB(180, 0, 255), c2 = Color3.fromRGB(255, 100, 200)},
    {name = L("ЗОЛОТО", "GOLD"), c1 = Color3.fromRGB(255, 215, 0), c2 = Color3.fromRGB(255, 140, 0)},
    {name = L("КРОВЬ", "BLOOD"), c1 = D9.Theme.AccentRed, c2 = Color3.fromRGB(50, 0, 0)},
    {name = L("ПРИЗРАК", "GHOST"), c1 = D9.Theme.TextGray, c2 = Color3.fromRGB(50, 100, 150)}
}

D9.DB.STrails = {
    {name = L("МОЛНИЯ", "LIGHTNING"), c1 = D9.Theme.AccentYellow, c2 = D9.Theme.TextWhite},
    {name = L("ФЛЭШ", "FLASH"), c1 = D9.Theme.AccentRed, c2 = D9.Theme.AccentYellow},
    {name = L("ПУСТОТА", "VOID"), c1 = D9.Theme.AccentPurple, c2 = Color3.new(0, 0, 0)},
    {name = L("ТОКСИЧНОСТЬ", "TOXIC"), c1 = D9.Theme.AccentGreen, c2 = Color3.fromRGB(0, 100, 0)},
    {name = L("ЛЁД", "ICE"), c1 = D9.Theme.AccentCyan, c2 = Color3.fromRGB(0, 50, 255)},
    {name = L("ИНФЕРНО", "INFERNO"), c1 = Color3.fromRGB(255, 50, 0), c2 = Color3.fromRGB(100, 0, 0)},
    {name = L("АНГЕЛ", "ANGEL"), c1 = D9.Theme.TextWhite, c2 = Color3.fromRGB(200, 200, 200)},
    {name = L("НЕОН БЕГ", "NEON RUN"), c1 = Color3.fromRGB(255, 0, 150), c2 = D9.Theme.AccentCyan}
}

D9.DB.Shaders = {
    {name = L("КИНО", "CINEMATIC"), b = 0.05, c = 0.25, s = 0.35, t = Color3.fromRGB(255, 250, 240), blI = 0.65, blS = 24, blT = 0.8, sr = 0.15, acc = D9.Theme.AccentPurple},
    {name = L("АНИМЕ", "ANIME"), b = 0.1, c = 0.2, s = 0.8, t = Color3.fromRGB(255, 240, 230), blI = 1.0, blS = 30, blT = 0.7, sr = 0.3, acc = D9.Theme.AccentRed},
    {name = L("МАТРИЦА", "MATRIX"), b = -0.1, c = 0.5, s = 0.4, t = Color3.fromRGB(150, 255, 150), blI = 1.2, blS = 18, blT = 0.5, sr = 0.1, acc = D9.Theme.AccentGreen},
    {name = L("НЕОН ГОРОД", "NEON CITY"), b = -0.05, c = 0.3, s = 0.7, t = Color3.fromRGB(200, 150, 255), blI = 1.5, blS = 35, blT = 0.6, sr = 0.2, acc = D9.Theme.AccentPurple},
    {name = L("ИНФРАКРАСНЫЙ", "INFRARED"), b = 0.2, c = 1.5, s = -1.0, t = Color3.fromRGB(255, 50, 50), blI = 1.5, blS = 40, blT = 0.5, sr = 0.1, acc = D9.Theme.AccentRed},
    {name = L("ЯДЕРНЫЙ ВЗРЫВ", "NUKE"), b = 0.5, c = 0.8, s = 1.5, t = Color3.fromRGB(255, 200, 100), blI = 2.0, blS = 50, blT = 0.3, sr = 1.0, acc = D9.Theme.AccentYellow},
    {name = L("КОСМОС", "SPACE"), b = -0.2, c = 0.6, s = 0.9, t = Color3.fromRGB(50, 0, 100), blI = 1.2, blS = 30, blT = 0.6, sr = 0.5, acc = D9.Theme.AccentPurple}
}

D9.DB.Fonts = {
    {name = "Gotham", val = Enum.Font.GothamMedium},
    {name = "Code", val = Enum.Font.Code},
    {name = "Arcade", val = Enum.Font.Arcade}
}

D9.DB.Wallpapers = {
    {name = L("Аниме Город", "Anime City"), id = "rbxassetid://12602711681"},
    {name = L("Киберпанк", "Cyberpunk"), id = "rbxassetid://11130386766"},
    {name = L("Космос", "Space"), id = "rbxassetid://152643039"},
    {name = L("Синтвейв", "Synthwave"), id = "rbxassetid://8013110593"},
    {name = L("БЕЗ ОБОЕВ", "NO WALLPAPER"), id = ""}
}

D9.DB.Tips = {
    L("Включайте Noclip только за стенами.", "Only enable Noclip while hidden behind walls."),
    L("ESP абсолютно невидим для серверов.", "ESP is completely invisible to server-side anti-cheats.")
}

-- ==========================================
-- 4. ИНИЦИАЛИЗАЦИЯ ШЕЙДЕРОВ В КАМЕРЕ
-- ==========================================
pcall(function()
    D9.Cache.VisualFX = {
        ColorCorrection = Instance.new("ColorCorrectionEffect", D9.Core.Camera),
        Bloom = Instance.new("BloomEffect", D9.Core.Camera),
        SunRays = Instance.new("SunRaysEffect", D9.Core.Camera)
    }
    D9.Cache.VisualFX.ColorCorrection.Enabled = false
    D9.Cache.VisualFX.Bloom.Enabled = false
    D9.Cache.VisualFX.SunRays.Enabled = false
end)

-- ==========================================
-- 5. УТИЛИТЫ ИНТЕРФЕЙСА (С ПРАВИЛЬНЫМИ СЛОЯМИ ZINDEX)
-- ==========================================
D9.Funcs.RegisterText = function(element)
    table.insert(D9.Cache.AllTextElements, element)
    pcall(function() element.Font = D9.DB.Fonts[D9.Config.FontIndex].val end)
end

D9.Funcs.ApplyGlobalFont = function()
    local font = D9.DB.Fonts[D9.Config.FontIndex].val
    for _, el in ipairs(D9.Cache.AllTextElements) do pcall(function() el.Font = font end) end
end

D9.Funcs.CreateHover = function(button)
    button.AutoButtonColor = false
    local hoverFrame = Instance.new("Frame", button)
    hoverFrame.Size = UDim2.new(1, 0, 1, 0)
    hoverFrame.BackgroundColor3 = Color3.new(1, 1, 1)
    hoverFrame.BackgroundTransparency = 1
    hoverFrame.ZIndex = button.ZIndex + 1
    Instance.new("UICorner", hoverFrame).CornerRadius = UDim.new(0, 6)
    
    button.MouseEnter:Connect(function() D9.Core.TS:Create(hoverFrame, TweenInfo.new(0.15), {BackgroundTransparency = 0.92}):Play() end)
    button.MouseLeave:Connect(function() D9.Core.TS:Create(hoverFrame, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play() end)
    button.MouseButton1Down:Connect(function() 
        pcall(function() local snd = Instance.new("Sound", D9.Core.Snd); snd.SoundId = "rbxassetid://6895079853"; snd.Volume = 0.3; snd:Play(); game.Debris:AddItem(snd, 1) end)
        D9.Core.TS:Create(hoverFrame, TweenInfo.new(0.1), {BackgroundTransparency = 0.8}):Play()
        D9.Core.TS:Create(button, TweenInfo.new(0.1), {Size = UDim2.new(button.Size.X.Scale, button.Size.X.Offset - 2, button.Size.Y.Scale, button.Size.Y.Offset - 2)}):Play() 
    end)
    button.MouseButton1Up:Connect(function() 
        D9.Core.TS:Create(hoverFrame, TweenInfo.new(0.15), {BackgroundTransparency = 0.92}):Play()
        D9.Core.TS:Create(button, TweenInfo.new(0.15, Enum.EasingStyle.Bounce), {Size = UDim2.new(button.Size.X.Scale, button.Size.X.Offset + 2, button.Size.Y.Scale, button.Size.Y.Offset + 2)}):Play() 
    end)
end

D9.Funcs.CreateButton = function(parent, text, height)
    local btn = Instance.new("TextButton", parent)
    btn.Size = UDim2.new(1, -20, 0, height or 35)
    btn.BackgroundColor3 = D9.Theme.ButtonBase
    btn.TextColor3 = D9.Theme.TextWhite
    btn.Text = text
    btn.TextSize = 12
    btn.ZIndex = 50 
    Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)
    local stroke = Instance.new("UIStroke", btn)
    stroke.Color = D9.Theme.Stroke
    stroke.Transparency = 0.2
    D9.Funcs.RegisterText(btn)
    D9.Funcs.CreateHover(btn)
    return btn
end

D9.Funcs.SetActive = function(btn, text, color)
    btn.Text = text
    D9.Core.TS:Create(btn, TweenInfo.new(0.3), {BackgroundColor3 = color}):Play()
    local s = btn:FindFirstChildOfClass("UIStroke")
    if s then s.Color = color; s.Transparency = 0.1 end
end

D9.Funcs.SetInactive = function(btn, text)
    btn.Text = text
    D9.Core.TS:Create(btn, TweenInfo.new(0.3), {BackgroundColor3 = D9.Theme.ButtonBase}):Play()
    local s = btn:FindFirstChildOfClass("UIStroke")
    if s then s.Color = D9.Theme.Stroke; s.Transparency = 0.2 end
end

-- ==========================================
-- 6. ИНИЦИАЛИЗАЦИЯ ОСНОВНОГО GUI
-- ==========================================
D9.UI.MainGui = Instance.new("ScreenGui", TargetGui)
D9.UI.MainGui.Name = "deskret9_hub_pro"
D9.UI.MainGui.ResetOnSpawn = false
D9.UI.MainGui.IgnoreGuiInset = true

D9.UI.ESPFolder = Instance.new("Folder", D9.Core.Camera)
D9.UI.ESPFolder.Name = "D9_ESP"

-- АНИМАЦИЯ ЗАГРУЗКИ
D9.UI.LoadScreen = Instance.new("Frame", D9.UI.MainGui)
D9.UI.LoadScreen.Size = UDim2.new(1, 0, 1, 0)
D9.UI.LoadScreen.BackgroundColor3 = D9.Theme.BgMain
D9.UI.LoadScreen.ZIndex = 1000

D9.UI.Spinner = Instance.new("ImageLabel", D9.UI.LoadScreen)
D9.UI.Spinner.Size = UDim2.new(0, 120, 0, 120)
D9.UI.Spinner.Position = UDim2.new(0.5, -60, 0.4, -60)
D9.UI.Spinner.BackgroundTransparency = 1
D9.UI.Spinner.Image = "rbxassetid://13669146114"
D9.UI.Spinner.ImageColor3 = D9.Theme.AccentBlue
D9.UI.Spinner.ZIndex = 1001

D9.UI.LoadText = Instance.new("TextLabel", D9.UI.LoadScreen)
D9.UI.LoadText.Size = UDim2.new(0, 400, 0, 40)
D9.UI.LoadText.Position = UDim2.new(0.5, -200, 0.4, 80)
D9.UI.LoadText.BackgroundTransparency = 1
D9.UI.LoadText.Text = "DECRYPTING CORE..."
D9.UI.LoadText.TextColor3 = D9.Theme.AccentCyan
D9.UI.LoadText.Font = Enum.Font.Code
D9.UI.LoadText.TextSize = 18
D9.UI.LoadText.ZIndex = 1001

D9.UI.LoadBarBg = Instance.new("Frame", D9.UI.LoadScreen)
D9.UI.LoadBarBg.Size = UDim2.new(0, 300, 0, 6)
D9.UI.LoadBarBg.Position = UDim2.new(0.5, -150, 0.4, 130)
D9.UI.LoadBarBg.BackgroundColor3 = D9.Theme.BgPanel
D9.UI.LoadBarBg.ZIndex = 1001
Instance.new("UICorner", D9.UI.LoadBarBg).CornerRadius = UDim.new(1, 0)

D9.UI.LoadBarFill = Instance.new("Frame", D9.UI.LoadBarBg)
D9.UI.LoadBarFill.Size = UDim2.new(0, 0, 1, 0)
D9.UI.LoadBarFill.BackgroundColor3 = D9.Theme.AccentCyan
D9.UI.LoadBarFill.ZIndex = 1002
Instance.new("UICorner", D9.UI.LoadBarFill).CornerRadius = UDim.new(1, 0)

task.spawn(function()
    local rot = 0
    while D9.UI.LoadScreen and D9.UI.LoadScreen.Parent do
        rot = rot + 7
        pcall(function() D9.UI.Spinner.Rotation = rot end)
        task.wait(0.02)
    end
end)

task.spawn(function()
    local steps = {"Bypassing Anti-Cheat...", "Injecting Interface...", "Loading Databases...", "Compiling Rendering Engine...", "Ready."}
    for i, text in ipairs(steps) do
        D9.UI.LoadText.Text = text
        D9.Core.TS:Create(D9.UI.LoadBarFill, TweenInfo.new(0.4), {Size = UDim2.new(i/#steps, 0, 1, 0)}):Play()
        task.wait(0.5)
    end
    D9.UI.LoadText.Text = "SYSTEM ONLINE"
    D9.UI.LoadText.TextColor3 = D9.Theme.AccentGreen
    D9.UI.LoadBarFill.BackgroundColor3 = D9.Theme.AccentGreen
    
    task.wait(0.4)
    D9.Core.TS:Create(D9.UI.LoadScreen, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
    D9.Core.TS:Create(D9.UI.Spinner, TweenInfo.new(0.5), {ImageTransparency = 1}):Play()
    D9.Core.TS:Create(D9.UI.LoadText, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
    D9.Core.TS:Create(D9.UI.LoadBarBg, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
    D9.Core.TS:Create(D9.UI.LoadBarFill, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
    task.wait(0.5)
    D9.UI.LoadScreen:Destroy()
end)

-- ==========================================
-- 7. ПРЕМИУМ КАРКАС ИНТЕРФЕЙСА
-- ==========================================
D9.UI.Main = Instance.new("Frame", D9.UI.MainGui)
D9.UI.Main.Size = UDim2.new(0, 550, 0, 350)
D9.UI.Main.Position = UDim2.new(0.5, -275, 0.5, -175)
D9.UI.Main.BackgroundColor3 = D9.Theme.BgMain
D9.UI.Main.ClipsDescendants = false
D9.UI.Main.Active = true
D9.UI.Main.ZIndex = 10 
D9.UI.Main.Visible = false
Instance.new("UICorner", D9.UI.Main).CornerRadius = UDim.new(0, 10)
local MainStroke = Instance.new("UIStroke", D9.UI.Main)
MainStroke.Color = D9.Theme.Stroke; MainStroke.Thickness = 1.5

task.spawn(function() task.wait(2.7); D9.UI.Main.Visible = true end)

D9.UI.Shadow = Instance.new("ImageLabel", D9.UI.Main)
D9.UI.Shadow.Size = UDim2.new(1, 40, 1, 40); D9.UI.Shadow.Position = UDim2.new(0, -20, 0, -20)
D9.UI.Shadow.BackgroundTransparency = 1; D9.UI.Shadow.Image = "rbxassetid://1316045217"
D9.UI.Shadow.ImageColor3 = Color3.new(0, 0, 0); D9.UI.Shadow.ImageTransparency = 0.4
D9.UI.Shadow.ScaleType = Enum.ScaleType.Slice; D9.UI.Shadow.SliceCenter = Rect.new(10, 10, 118, 118)
D9.UI.Shadow.ZIndex = 9

D9.UI.InnerFrame = Instance.new("Frame", D9.UI.Main)
D9.UI.InnerFrame.Size = UDim2.new(1, 0, 1, 0)
D9.UI.InnerFrame.BackgroundTransparency = 1
D9.UI.InnerFrame.ClipsDescendants = true
D9.UI.InnerFrame.ZIndex = 11
Instance.new("UICorner", D9.UI.InnerFrame).CornerRadius = UDim.new(0, 10)

D9.UI.WallpaperDisplay = Instance.new("ImageLabel", D9.UI.InnerFrame)
D9.UI.WallpaperDisplay.Size = UDim2.new(1, 0, 1, 0); D9.UI.WallpaperDisplay.BackgroundTransparency = 1
D9.UI.WallpaperDisplay.ImageTransparency = 0.85; D9.UI.WallpaperDisplay.ScaleType = Enum.ScaleType.Crop
D9.UI.WallpaperDisplay.ZIndex = 12

D9.UI.TintFrame = Instance.new("Frame", D9.UI.InnerFrame)
D9.UI.TintFrame.Size = UDim2.new(1, 0, 1, 0)
D9.UI.TintFrame.BackgroundColor3 = D9.Theme.BgMain
D9.UI.TintFrame.BackgroundTransparency = 0.1
D9.UI.TintFrame.ZIndex = 13

D9.Funcs.UpdateWallpaper = function()
    if D9.Config.Wallpaper ~= "" then
        pcall(function() D9.UI.WallpaperDisplay.Image = D9.Config.Wallpaper; D9.UI.TintFrame.BackgroundTransparency = 0.35 end)
    else D9.UI.WallpaperDisplay.Image = ""; D9.UI.TintFrame.BackgroundTransparency = 0.05 end
end

-- ШАПКА ХАБА
D9.UI.Header = Instance.new("Frame", D9.UI.InnerFrame)
D9.UI.Header.Size = UDim2.new(1, 0, 0, 40)
D9.UI.Header.BackgroundTransparency = 1
D9.UI.Header.Active = true
D9.UI.Header.ZIndex = 20

D9.UI.Title = Instance.new("TextLabel", D9.UI.Header)
D9.UI.Title.Size = UDim2.new(0, 300, 1, 0); D9.UI.Title.Position = UDim2.new(0, 15, 0, 0)
D9.UI.Title.BackgroundTransparency = 1; D9.UI.Title.Text = "deskret9 | " .. string.upper(string.sub(D9.Core.ExecutorName, 1, 8))
D9.UI.Title.TextColor3 = D9.Theme.TextWhite; D9.UI.Title.Font = Enum.Font.GothamBlack
D9.UI.Title.TextSize = 13; D9.UI.Title.TextXAlignment = Enum.TextXAlignment.Left
D9.UI.Title.ZIndex = 25
D9.Funcs.RegisterText(D9.UI.Title)

local dragToggle = nil; local dragStart = nil; local startPos = nil
D9.UI.Header.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragToggle = true; dragStart = input.Position; startPos = D9.UI.Main.Position
        input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragToggle = false end end)
    end
end)
D9.Core.UIS.InputChanged:Connect(function(input)
    if dragToggle and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = input.Position - dragStart
        D9.UI.Main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
    end
end)

D9.UI.MinBtn = Instance.new("TextButton", D9.UI.Header)
D9.UI.MinBtn.Size = UDim2.new(0, 24, 0, 24); D9.UI.MinBtn.Position = UDim2.new(1, -65, 0, 8)
D9.UI.MinBtn.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.MinBtn.TextColor3 = D9.Theme.TextWhite
D9.UI.MinBtn.Text = "—"; D9.UI.MinBtn.Font = Enum.Font.GothamBold; D9.UI.MinBtn.TextSize = 12
D9.UI.MinBtn.ZIndex = 25
Instance.new("UICorner", D9.UI.MinBtn).CornerRadius = UDim.new(0, 6)
local minS = Instance.new("UIStroke", D9.UI.MinBtn); minS.Color = D9.Theme.Stroke; minS.Transparency = 0.5
D9.Funcs.CreateHover(D9.UI.MinBtn)

D9.UI.ClsBtn = Instance.new("TextButton", D9.UI.Header)
D9.UI.ClsBtn.Size = UDim2.new(0, 24, 0, 24); D9.UI.ClsBtn.Position = UDim2.new(1, -34, 0, 8)
D9.UI.ClsBtn.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.ClsBtn.TextColor3 = D9.Theme.AccentRed
D9.UI.ClsBtn.Text = "✕"; D9.UI.ClsBtn.Font = Enum.Font.GothamBold; D9.UI.ClsBtn.TextSize = 12
D9.UI.ClsBtn.ZIndex = 25
Instance.new("UICorner", D9.UI.ClsBtn).CornerRadius = UDim.new(0, 6)
local clsS = Instance.new("UIStroke", D9.UI.ClsBtn); clsS.Color = D9.Theme.AccentRed; clsS.Transparency = 0.5
D9.Funcs.CreateHover(D9.UI.ClsBtn)

D9.UI.ClsBtn.MouseButton1Click:Connect(function() D9.UI.MainGui:Destroy(); if D9.UI.ESPFolder then D9.UI.ESPFolder:Destroy() end end)

-- БОКОВОЕ МЕНЮ И КОНТЕНТ
D9.UI.Sidebar = Instance.new("Frame", D9.UI.InnerFrame)
D9.UI.Sidebar.Size = UDim2.new(0, 140, 1, -40); D9.UI.Sidebar.Position = UDim2.new(0, 0, 0, 40)
D9.UI.Sidebar.BackgroundColor3 = D9.Theme.BgSidebar; D9.UI.Sidebar.BorderSizePixel = 0
D9.UI.Sidebar.ZIndex = 20

D9.UI.SidebarScroll = Instance.new("ScrollingFrame", D9.UI.Sidebar)
D9.UI.SidebarScroll.Size = UDim2.new(1, 0, 1, 0); D9.UI.SidebarScroll.BackgroundTransparency = 1
D9.UI.SidebarScroll.ScrollingDirection = Enum.ScrollingDirection.Y; D9.UI.SidebarScroll.ScrollBarThickness = 2
D9.UI.SidebarScroll.ScrollBarImageColor3 = D9.Theme.Stroke; D9.UI.SidebarScroll.ZIndex = 21

local SideLay = Instance.new("UIListLayout", D9.UI.SidebarScroll)
SideLay.Padding = UDim.new(0, 5); SideLay.HorizontalAlignment = Enum.HorizontalAlignment.Center; SideLay.SortOrder = Enum.SortOrder.LayoutOrder
local SidePad = Instance.new("UIPadding", D9.UI.SidebarScroll)
SidePad.PaddingTop = UDim.new(0, 10); SidePad.PaddingBottom = UDim.new(0, 10)

SideLay:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
    D9.UI.SidebarScroll.CanvasSize = UDim2.new(0, 0, 0, SideLay.AbsoluteContentSize.Y + 20)
end)

D9.UI.ContentArea = Instance.new("Frame", D9.UI.InnerFrame)
D9.UI.ContentArea.Size = UDim2.new(1, -140, 1, -40); D9.UI.ContentArea.Position = UDim2.new(0, 140, 0, 40)
D9.UI.ContentArea.BackgroundTransparency = 1; D9.UI.ContentArea.ZIndex = 20

D9.Funcs.ToggleMinimize = function()
    D9.Config.Minimized = not D9.Config.Minimized
    local tgY = D9.Config.Minimized and 40 or 350
    D9.Core.TS:Create(D9.UI.Main, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 550, 0, tgY)}):Play()
    D9.UI.Sidebar.Visible = not D9.Config.Minimized; D9.UI.ContentArea.Visible = not D9.Config.Minimized
    D9.UI.MinBtn.Text = D9.Config.Minimized and "+" or "—"
end
D9.UI.MinBtn.MouseButton1Click:Connect(D9.Funcs.ToggleMinimize)

D9.UI.TabBtns = {}
D9.UI.TabCnts = {}

local function AddTab(name, icon, color, isFirst, order)
    local btn = Instance.new("TextButton", D9.UI.SidebarScroll)
    btn.Size = UDim2.new(1, -16, 0, 30); btn.BackgroundColor3 = isFirst and color or D9.Theme.ButtonBase
    btn.Text = icon .. "  " .. name; btn.TextColor3 = D9.Theme.TextWhite; btn.TextSize = 11
    btn.LayoutOrder = order; btn.TextXAlignment = Enum.TextXAlignment.Left; btn.ZIndex = 25
    Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)
    
    local pad = Instance.new("UIPadding", btn); pad.PaddingLeft = UDim.new(0, 10)
    local s = Instance.new("UIStroke", btn); s.Color = isFirst and color or D9.Theme.Stroke; s.Transparency = isFirst and 0.2 or 0.8
    D9.Funcs.RegisterText(btn); D9.Funcs.CreateHover(btn)
    
    local sf = Instance.new("ScrollingFrame", D9.UI.ContentArea)
    sf.Size = UDim2.new(1, 0, 1, 0); sf.BackgroundTransparency = 1; sf.ScrollingDirection = Enum.ScrollingDirection.Y
    sf.ScrollBarThickness = 2; sf.ScrollBarImageColor3 = color; sf.Visible = isFirst; sf.ZIndex = 25
    
    local lay = Instance.new("UIListLayout", sf)
    lay.Padding = UDim.new(0, 8); lay.HorizontalAlignment = Enum.HorizontalAlignment.Center; lay.SortOrder = Enum.SortOrder.LayoutOrder
    lay:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() sf.CanvasSize = UDim2.new(0, 0, 0, lay.AbsoluteContentSize.Y + 30) end)
    
    local fpad = Instance.new("UIPadding", sf); fpad.PaddingTop = UDim.new(0, 10); fpad.PaddingBottom = UDim.new(0, 15)
    
    local secTitle = Instance.new("TextLabel", sf)
    secTitle.Size = UDim2.new(1, -20, 0, 35)
    secTitle.BackgroundTransparency = 1
    secTitle.Text = icon .. " " .. name
    secTitle.TextColor3 = color
    secTitle.Font = Enum.Font.GothamBlack
    secTitle.TextSize = 20
    secTitle.TextXAlignment = Enum.TextXAlignment.Left
    secTitle.LayoutOrder = -999 
    secTitle.ZIndex = 26
    D9.Funcs.RegisterText(secTitle)
    
    table.insert(D9.UI.TabBtns, btn); table.insert(D9.UI.TabCnts, {frame = sf, color = color})
    
    btn.MouseButton1Click:Connect(function()
        for i, b in ipairs(D9.UI.TabBtns) do
            local sel = (b == btn)
            D9.UI.TabCnts[i].frame.Visible = sel
            D9.Core.TS:Create(b, TweenInfo.new(0.3), {BackgroundColor3 = sel and D9.UI.TabCnts[i].color or D9.Theme.ButtonBase}):Play()
            b.UIStroke.Color = sel and D9.UI.TabCnts[i].color or D9.Theme.Stroke; b.UIStroke.Transparency = sel and 0.2 or 0.8
        end
    end)
    return sf
end

local PgFly = AddTab(L("Полёт", "Flight"), "🚀", D9.Theme.AccentBlue, true, 1)
local PgSpd = AddTab(L("Скорость", "Speed"), "⚡", D9.Theme.AccentGreen, false, 2)
local PgEsp = AddTab(L("Валлхак", "Wallhack"), "👁️", D9.Theme.AccentRed, false, 3)
local PgShd = AddTab(L("Графика", "Visuals"), "🎨", D9.Theme.AccentPurple, false, 4)
local PgNcl = AddTab(L("Призрак", "Ghost"), "👻", D9.Theme.TextGray, false, 5)
local PgXry = AddTab("X-Ray", "👀", D9.Theme.AccentYellow, false, 6)
local PgScr = AddTab(L("Скрипты", "Scripts"), "💻", D9.Theme.AccentCyan, false, 7)
local PgSrc = AddTab(L("Поиск", "Search"), "🔍", D9.Theme.TextWhite, false, 8)
local PgIde = AddTab(L("Редактор", "Editor"), "📝", D9.Theme.AccentBlue, false, 9)
local PgAI  = AddTab(L("Ассистент", "Assistant"), "🤖", D9.Theme.AccentPurple, false, 10)
local PgSet = AddTab(L("Настройки", "Settings"), "⚙️", D9.Theme.AccentOrange, false, 11)

-- СИСТЕМА ОВЕРЛЕЯ
D9.UI.Ovl = Instance.new("Frame", D9.UI.InnerFrame)
D9.UI.Ovl.Size = UDim2.new(1, -140, 1, -40); D9.UI.Ovl.Position = UDim2.new(0, 140, 0, 40)
D9.UI.Ovl.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.Ovl.BackgroundTransparency = 0.05
D9.UI.Ovl.Visible = false; D9.UI.Ovl.ZIndex = 200; D9.UI.Ovl.Active = true

D9.UI.OvlTit = Instance.new("TextLabel", D9.UI.Ovl)
D9.UI.OvlTit.Size = UDim2.new(1, 0, 0, 30); D9.UI.OvlTit.Position = UDim2.new(0, 0, 0, 5)
D9.UI.OvlTit.BackgroundTransparency = 1; D9.UI.OvlTit.TextColor3 = D9.Theme.AccentBlue
D9.UI.OvlTit.Font = Enum.Font.GothamBlack; D9.UI.OvlTit.TextSize = 12; D9.UI.OvlTit.ZIndex = 201

D9.UI.OvlScr = Instance.new("ScrollingFrame", D9.UI.Ovl)
D9.UI.OvlScr.Size = UDim2.new(1, -20, 1, -80); D9.UI.OvlScr.Position = UDim2.new(0, 10, 0, 35)
D9.UI.OvlScr.BackgroundTransparency = 1; D9.UI.OvlScr.ScrollingDirection = Enum.ScrollingDirection.Y
D9.UI.OvlScr.ScrollBarThickness = 2; D9.UI.OvlScr.ScrollBarImageColor3 = D9.Theme.Stroke; D9.UI.OvlScr.ZIndex = 201
local osl = Instance.new("UIListLayout", D9.UI.OvlScr); osl.Padding = UDim.new(0, 6); osl.HorizontalAlignment = Enum.HorizontalAlignment.Center
osl:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() D9.UI.OvlScr.CanvasSize = UDim2.new(0,0,0,osl.AbsoluteContentSize.Y + 20) end)
local osp = Instance.new("UIPadding", D9.UI.OvlScr); osp.PaddingTop = UDim.new(0, 5); osp.PaddingBottom = UDim.new(0, 5)

D9.UI.OCls = Instance.new("TextButton", D9.UI.Ovl)
D9.UI.OCls.Size = UDim2.new(1, -20, 0, 26); D9.UI.OCls.Position = UDim2.new(0, 10, 1, -34)
D9.UI.OCls.BackgroundColor3 = D9.Theme.BgMain; D9.UI.OCls.TextColor3 = D9.Theme.AccentRed
D9.UI.OCls.Text = L("ОТМЕНА", "CANCEL"); D9.UI.OCls.Font = Enum.Font.GothamBlack; D9.UI.OCls.TextSize = 11; D9.UI.OCls.ZIndex = 201
Instance.new("UICorner", D9.UI.OCls).CornerRadius = UDim.new(0, 6)
local os = Instance.new("UIStroke", D9.UI.OCls); os.Color = D9.Theme.AccentRed; os.Transparency = 0.3; D9.Funcs.CreateHover(D9.UI.OCls)
D9.UI.OCls.MouseButton1Click:Connect(function() D9.UI.Ovl.Visible = false end)

D9.Funcs.OpenOvl = function(tit, items, cb)
    D9.UI.OvlTit.Text = tit
    for _, c in ipairs(D9.UI.OvlScr:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end
    for i, v in ipairs(items) do
        local ob = Instance.new("TextButton", D9.UI.OvlScr)
        ob.Size = UDim2.new(1, -10, 0, 28); ob.BackgroundColor3 = D9.Theme.ButtonBase; ob.TextColor3 = D9.Theme.TextWhite
        ob.Text = v.name; ob.TextSize = 11; ob.ZIndex = 202; Instance.new("UICorner", ob).CornerRadius = UDim.new(0, 6)
        local ost = Instance.new("UIStroke", ob); ost.Color = v.c1 or v.acc or D9.Theme.TextWhite; ost.Transparency = 0.6
        D9.Funcs.RegisterText(ob); D9.Funcs.CreateHover(ob)
        ob.MouseButton1Click:Connect(function() D9.UI.Ovl.Visible = false; cb(i) end)
    end
    D9.UI.Ovl.Visible = true
end

-- ==========================================
-- ЛОГИКА АНИМАЦИЙ ПЕРСОНАЖА
-- ==========================================
D9.Funcs.UpdAnims = function()
    local c = D9.Core.Player.Character; if not c then return end
    local hum = c:FindFirstChild("Humanoid"); if not hum then return end
    local anm = hum:FindFirstChild("Animator"); if not anm then return end
    if D9.Cache.AnimTracks.Hover then D9.Cache.AnimTracks.Hover:Stop(0.1) end; if D9.Cache.AnimTracks.Forward then D9.Cache.AnimTracks.Forward:Stop(0.1) end; if D9.Cache.AnimTracks.Boost then D9.Cache.AnimTracks.Boost:Stop(0.1) end
    local cd = D9.DB.Anims[D9.Config.AnimIndex]; local a1 = Instance.new("Animation"); a1.AnimationId = "rbxassetid://" .. cd.hover; D9.Cache.AnimTracks.Hover = anm:LoadAnimation(a1); D9.Cache.AnimTracks.Hover.Priority = Enum.AnimationPriority.Action; D9.Cache.AnimTracks.Hover.Looped = true
    local a2 = Instance.new("Animation"); a2.AnimationId = "rbxassetid://" .. cd.forward; D9.Cache.AnimTracks.Forward = anm:LoadAnimation(a2); D9.Cache.AnimTracks.Forward.Priority = Enum.AnimationPriority.Action2; D9.Cache.AnimTracks.Forward.Looped = true
    local a3 = Instance.new("Animation"); a3.AnimationId = "rbxassetid://" .. D9.DB.Boosts[D9.Config.BoostIndex].id; D9.Cache.AnimTracks.Boost = anm:LoadAnimation(a3); D9.Cache.AnimTracks.Boost.Priority = Enum.AnimationPriority.Action3; D9.Cache.AnimTracks.Boost.Looped = true
    if D9.Config.IsFlying then D9.Cache.AnimTracks.Hover:Play(0.2) end
end

-- ==========================================
-- ФУНКЦИОНАЛ: ПОЛЕТ И КАМЕРА
-- ==========================================
D9.UI.BFly = D9.Funcs.CreateButton(PgFly, L("✈ ПОЛЁТ: ВЫКЛ [E]", "✈ FLY: OFF [E]"))
D9.UI.BDrn = D9.Funcs.CreateButton(PgFly, L("🚁 ДРОН: ВЫКЛ [Q]", "🚁 DRONE: OFF [Q]"))
D9.UI.BSpc = D9.Funcs.CreateButton(PgFly, L("👁 СПЕКТАТОР: ВЫКЛ [X]", "👁 SPECTATE: OFF [X]"))
D9.UI.BAnm = D9.Funcs.CreateButton(PgFly, L("🎭 ПОЗА: ", "🎭 POSE: ") .. D9.DB.Anims[D9.Config.AnimIndex].name .. " ▼")
D9.UI.BTrl = D9.Funcs.CreateButton(PgFly, L("✨ ТРОПА: ", "✨ TRAIL: ") .. D9.DB.FTrails[D9.Config.FTrailIndex].name .. " ▼")
D9.UI.BBst = D9.Funcs.CreateButton(PgFly, L("🚀 БУСТ: ", "🚀 BOOST: ") .. D9.DB.Boosts[D9.Config.BoostIndex].name)

D9.UI.BAnm.MouseButton1Click:Connect(function() D9.Funcs.OpenOvl(L("ВЫБЕРИТЕ ПОЗУ", "SELECT POSE"), D9.DB.Anims, function(i) D9.Config.AnimIndex = i; D9.UI.BAnm.Text = L("🎭 ПОЗА: ", "🎭 POSE: ")..D9.DB.Anims[i].name.." ▼"; D9.Funcs.UpdAnims() end) end)
D9.UI.BTrl.MouseButton1Click:Connect(function() D9.Funcs.OpenOvl(L("ТРОПА ПОЛЁТА", "FLIGHT TRAIL"), D9.DB.FTrails, function(i) D9.Config.FTrailIndex = i; D9.UI.BTrl.Text = L("✨ ТРОПА: ", "✨ TRAIL: ")..D9.DB.FTrails[i].name.." ▼" end) end)
D9.UI.BBst.MouseButton1Click:Connect(function() D9.Config.BoostIndex = D9.Config.BoostIndex == 1 and 2 or 1; D9.UI.BBst.Text = L("🚀 БУСТ: ", "🚀 BOOST: ")..D9.DB.Boosts[D9.Config.BoostIndex].name; D9.Funcs.UpdAnims() end)

D9.Funcs.TogFly = function(st)
    local c = D9.Core.Player.Character; if not c then return end; local hrp = c:FindFirstChild("HumanoidRootPart"); local hum = c:FindFirstChild("Humanoid"); if not hrp or not hum then return end
    if st ~= nil then D9.Config.IsFlying = st else D9.Config.IsFlying = not D9.Config.IsFlying end
    if D9.Config.IsFlying then
        if D9.Config.CamMode ~= "None" then D9.Config.CamMode = "None"; D9.Funcs.SetInactive(D9.UI.BDrn, L("🚁 ДРОН: ВЫКЛ [Q]", "🚁 DRONE: OFF [Q]")); D9.Funcs.SetInactive(D9.UI.BSpc, L("👁 СПЕКТАТОР: ВЫКЛ [X]", "👁 SPECTATE: OFF [X]")); if D9.Cache.FlyObj.DronePart then D9.Cache.FlyObj.DronePart:Destroy(); D9.Cache.FlyObj.DronePart = nil end; hrp.Anchored = false end
        hum:ChangeState(Enum.HumanoidStateType.Physics)
        D9.Cache.FlyObj.Attachment = Instance.new("Attachment", hrp); D9.Cache.FlyObj.Velocity = Instance.new("LinearVelocity", hrp); D9.Cache.FlyObj.Velocity.MaxForce = math.huge; D9.Cache.FlyObj.Velocity.VectorVelocity = Vector3.zero; D9.Cache.FlyObj.Velocity.Attachment0 = D9.Cache.FlyObj.Attachment; D9.Cache.FlyObj.Velocity.RelativeTo = Enum.ActuatorRelativeTo.World
        D9.Cache.FlyObj.Align = Instance.new("AlignOrientation", hrp); D9.Cache.FlyObj.Align.MaxTorque = math.huge; D9.Cache.FlyObj.Align.Responsiveness = 160; D9.Cache.FlyObj.Align.Attachment0 = D9.Cache.FlyObj.Attachment; D9.Cache.FlyObj.Align.Mode = Enum.OrientationAlignmentMode.OneAttachment; D9.Cache.FlyObj.Align.CFrame = D9.Core.Camera.CFrame
        D9.Cache.FlyObj.Att0 = Instance.new("Attachment", hrp); D9.Cache.FlyObj.Att0.Position = Vector3.new(-0.8, -1, 0); D9.Cache.FlyObj.Att1 = Instance.new("Attachment", hrp); D9.Cache.FlyObj.Att1.Position = Vector3.new(0.8, -1, 0)
        D9.Cache.FlyObj.Trail = Instance.new("Trail", hrp); D9.Cache.FlyObj.Trail.Attachment0 = D9.Cache.FlyObj.Att0; D9.Cache.FlyObj.Trail.Attachment1 = D9.Cache.FlyObj.Att1; local cd = D9.DB.FTrails[D9.Config.FTrailIndex]; D9.Cache.FlyObj.Trail.Color = ColorSequence.new(cd.c1, cd.c2); D9.Cache.FlyObj.Trail.Lifetime = 0.4; D9.Cache.FlyObj.Trail.LightEmission = 1; D9.Cache.FlyObj.Trail.WidthScale = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(1,0)}); D9.Cache.FlyObj.Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.2), NumberSequenceKeypoint.new(1,1)})
        if D9.Cache.AnimTracks.Hover then D9.Cache.AnimTracks.Hover:Play(0.2) end; D9.Funcs.SetActive(D9.UI.BFly, L("✈️ ПОЛЁТ: ВКЛ [E]", "✈️ FLY: ON [E]"), D9.Theme.AccentGreen)
    else
        hum:ChangeState(Enum.HumanoidStateType.GettingUp)
        if D9.Cache.AnimTracks.Hover then D9.Cache.AnimTracks.Hover:Stop(0.2) end; if D9.Cache.AnimTracks.Forward then D9.Cache.AnimTracks.Forward:Stop(0.2) end; if D9.Cache.AnimTracks.Boost then D9.Cache.AnimTracks.Boost:Stop(0.2) end
        if D9.Cache.FlyObj.Velocity then D9.Cache.FlyObj.Velocity:Destroy(); D9.Cache.FlyObj.Align:Destroy(); D9.Cache.FlyObj.Attachment:Destroy() end
        if D9.Cache.FlyObj.Trail then D9.Cache.FlyObj.Trail:Destroy(); D9.Cache.FlyObj.Att0:Destroy(); D9.Cache.FlyObj.Att1:Destroy() end
        D9.Funcs.SetInactive(D9.UI.BFly, L("✈ ПОЛЁТ: ВЫКЛ [E]", "✈ FLY: OFF [E]"))
    end
end

D9.Funcs.TogCam = function(m)
    local c = D9.Core.Player.Character; if not c then return end; local hrp = c:FindFirstChild("HumanoidRootPart"); local hum = c:FindFirstChild("Humanoid")
    if D9.Config.CamMode == m then
        D9.Config.CamMode = "None"; if m == "Drone" and D9.Cache.FlyObj.DronePart and hrp then c:PivotTo(D9.Cache.FlyObj.DronePart.CFrame) end
        if hrp then hrp.Anchored = false; hrp.AssemblyLinearVelocity = Vector3.zero end
        if D9.Cache.FlyObj.DronePart then D9.Cache.FlyObj.DronePart:Destroy(); D9.Cache.FlyObj.DronePart = nil; D9.Cache.FlyObj.DroneVel = nil; D9.Cache.FlyObj.DroneAlign = nil end
        if hum then hum:ChangeState(Enum.HumanoidStateType.Freefall); D9.Core.Camera.CameraSubject = hum end
        D9.Funcs.SetInactive(D9.UI.BDrn, L("🚁 ДРОН: ВЫКЛ [Q]", "🚁 DRONE: OFF [Q]")); D9.Funcs.SetInactive(D9.UI.BSpc, L("👁 СПЕКТАТОР: ВЫКЛ [X]", "👁 SPECTATE: OFF [X]"))
    else
        if D9.Config.IsFlying then D9.Funcs.TogFly(false) end; if hrp then hrp.Anchored = true end
        if not D9.Cache.FlyObj.DronePart then
            D9.Cache.FlyObj.DronePart = Instance.new("Part", workspace); D9.Cache.FlyObj.DronePart.Size = Vector3.new(1, 1, 1); D9.Cache.FlyObj.DronePart.Transparency = 1; D9.Cache.FlyObj.DronePart.CanCollide = false; D9.Cache.FlyObj.DronePart.Massless = true; D9.Cache.FlyObj.DronePart.CFrame = hrp and hrp.CFrame or D9.Core.Camera.CFrame
            local da = Instance.new("Attachment", D9.Cache.FlyObj.DronePart)
            D9.Cache.FlyObj.DroneVel = Instance.new("LinearVelocity", D9.Cache.FlyObj.DronePart); D9.Cache.FlyObj.DroneVel.MaxForce = math.huge; D9.Cache.FlyObj.DroneVel.Attachment0 = da; D9.Cache.FlyObj.DroneVel.RelativeTo = Enum.ActuatorRelativeTo.World
            D9.Cache.FlyObj.DroneAlign = Instance.new("AlignOrientation", D9.Cache.FlyObj.DronePart); D9.Cache.FlyObj.DroneAlign.MaxTorque = math.huge; D9.Cache.FlyObj.DroneAlign.Responsiveness = 160; D9.Cache.FlyObj.DroneAlign.Attachment0 = da; D9.Cache.FlyObj.DroneAlign.Mode = Enum.OrientationAlignmentMode.OneAttachment
        end
        if hum then D9.Core.Camera.CameraSubject = D9.Cache.FlyObj.DronePart end; D9.Config.CamMode = m
        if m == "Drone" then D9.Funcs.SetActive(D9.UI.BDrn, L("🚁 ДРОН: ВКЛ [Q]", "🚁 DRONE: ON [Q]"), D9.Theme.AccentPurple); D9.Funcs.SetInactive(D9.UI.BSpc, L("👁 СПЕКТАТОР: ВЫКЛ [X]", "👁 SPECTATE: OFF [X]"))
        else D9.Funcs.SetActive(D9.UI.BSpc, L("👁 СПЕКТАТОР: ВКЛ [X]", "👁 SPECTATE: ON [X]"), D9.Theme.AccentBlue); D9.Funcs.SetInactive(D9.UI.BDrn, L("🚁 ДРОН: ВЫКЛ [Q]", "🚁 DRONE: OFF [Q]")) end
    end
end
D9.UI.BFly.MouseButton1Click:Connect(function() D9.Funcs.TogFly() end)
D9.UI.BDrn.MouseButton1Click:Connect(function() D9.Funcs.TogCam("Drone") end)
D9.UI.BSpc.MouseButton1Click:Connect(function() D9.Funcs.TogCam("Spectator") end)

-- МЕГА АБИЛКА
D9.UI.CdLbl = Instance.new("TextLabel", D9.UI.MainGui); D9.UI.CdLbl.Size = UDim2.new(0, 180, 0, 35); D9.UI.CdLbl.Position = UDim2.new(1, -10, 1, -10); D9.UI.CdLbl.AnchorPoint = Vector2.new(1, 1); D9.UI.CdLbl.BackgroundColor3 = D9.Theme.BgMain; D9.UI.CdLbl.TextColor3 = D9.Theme.AccentRed; D9.UI.CdLbl.Font = Enum.Font.GothamBlack; D9.UI.CdLbl.TextSize = 12; D9.UI.CdLbl.Visible = false; D9.UI.CdLbl.ZIndex = 500; Instance.new("UICorner", D9.UI.CdLbl).CornerRadius = UDim.new(0, 8); local cs = Instance.new("UIStroke", D9.UI.CdLbl); cs.Color = D9.Theme.AccentRed; cs.Thickness = 2; D9.Funcs.RegisterText(D9.UI.CdLbl)

D9.Funcs.TrigAwk = function()
    if D9.Config.IsAwakened or D9.Config.Cooldown or not D9.Config.EnforceSpeed or D9.Config.IsFlying then return end; local c = D9.Core.Player.Character; if not c then return end; local hrp = c:FindFirstChild("HumanoidRootPart"); local hd = c:FindFirstChild("Head"); if not hrp or not hd then return end
    D9.Config.IsAwakened = true; local s = Instance.new("Sound", D9.Core.Snd); s.SoundId = "rbxassetid://876939830"; s.Volume = 3; s:Play(); game.Debris:AddItem(s, 3); hrp.Anchored = true; D9.Core.TS:Create(hrp, TweenInfo.new(1.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {CFrame = hrp.CFrame + Vector3.new(0, 15, 0)}):Play(); D9.Core.TS:Create(D9.Core.Camera, TweenInfo.new(1.5), {FieldOfView = 45}):Play()
    local au = Instance.new("Part", workspace); au.Material = Enum.Material.ForceField; au.Shape = Enum.PartType.Ball; au.Color = D9.Theme.AccentRed; au.Size = Vector3.new(40, 40, 40); au.CFrame = hrp.CFrame; au.Anchored = true; au.CanCollide = false; D9.Core.TS:Create(au, TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {Size = Vector3.new(1, 1, 1), Transparency = 1}):Play(); game.Debris:AddItem(au, 1.5)
    local bb = Instance.new("BillboardGui", hd); bb.Size = UDim2.new(0, 500, 0, 80); bb.StudsOffset = Vector3.new(0, 4.5, 0); bb.AlwaysOnTop = true; local txt = Instance.new("TextLabel", bb); txt.Size = UDim2.new(0, 0, 0, 0); txt.Position = UDim2.new(0.5, 0, 0.5, 0); txt.AnchorPoint = Vector2.new(0.5, 0.5); txt.BackgroundTransparency = 1; txt.TextScaled = true; txt.TextColor3 = D9.Theme.AccentRed; txt.Font = Enum.Font.GothamBlack; txt.Text = L("Я НИ ЗА ЧТО НЕ ПРОИГРАЮ!\nМОЙ НИМБ ВЗРЫВАЕТСЯ!", "I WILL NEVER LOSE!\nMY HALO EXPLODES!"); D9.Core.TS:Create(txt, TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {Size = UDim2.new(1, 0, 1, 0)}):Play()
    task.wait(1.5); local ts = Instance.new("Sound", D9.Core.Snd); ts.SoundId = "rbxassetid://9047101886"; ts.Volume = 2; ts.Looped = true; ts:Play(); local bs = Instance.new("Sound", D9.Core.Snd); bs.SoundId = "rbxassetid://165969964"; bs.Volume = 5; bs:Play(); game.Debris:AddItem(bs, 4); D9.Core.TS:Create(D9.Core.Camera, TweenInfo.new(0.5, Enum.EasingStyle.Bounce), {FieldOfView = 80}):Play()
    local ex = Instance.new("Part", workspace); ex.Shape = Enum.PartType.Ball; ex.Material = Enum.Material.Neon; ex.Color = D9.Theme.AccentRed; ex.Anchored = true; ex.CanCollide = false; ex.CFrame = hrp.CFrame; ex.Size = Vector3.new(2, 2, 2); D9.Core.TS:Create(ex, TweenInfo.new(0.6, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = Vector3.new(60, 60, 60), Transparency = 1}):Play(); game.Debris:AddItem(ex, 0.6); hrp.Anchored = false
    local c1 = D9.DB.STrails[D9.Config.STrailIndex].c1; local c2 = D9.DB.STrails[D9.Config.STrailIndex].c2; local hl = Instance.new("Highlight", c); hl.FillColor = c1; hl.OutlineColor = c2; hl.FillTransparency = 0.3; local fire = Instance.new("Fire", hrp); fire.Color = c1; fire.SecondaryColor = c2; fire.Size = 12; fire.Heat = 25
    task.spawn(function() task.wait(15); D9.Config.IsAwakened = false; if bb then bb:Destroy() end; if hl then hl:Destroy() end; if fire then fire:Destroy() end; D9.Core.TS:Create(D9.Core.Camera, TweenInfo.new(1), {FieldOfView = 70}):Play(); if ts then local fd = D9.Core.TS:Create(ts, TweenInfo.new(1), {Volume = 0}); fd:Play(); fd.Completed:Connect(function() ts:Destroy() end) end; D9.Config.Cooldown = true; D9.UI.CdLbl.Visible = true; for i = 30, 1, -1 do D9.UI.CdLbl.Text = L("⏳ ПЕРЕЗАРЯДКА: ", "⏳ COOLDOWN: ") .. i .. "s"; task.wait(1) end; D9.UI.CdLbl.Visible = false; D9.Config.Cooldown = false end)
end

-- ==========================================
-- ФУНКЦИОНАЛ: СКОРОСТЬ
-- ==========================================
D9.UI.BEnf = D9.Funcs.CreateButton(PgSpd, L("⚡ ПРИМЕНЯТЬ К ИГРОКУ: ВЫКЛ", "⚡ ENFORCE SPEED: OFF"))
D9.UI.BSTr = D9.Funcs.CreateButton(PgSpd, L("✨ ТРОПА СКОР.: ", "✨ SPEED TRAIL: ") .. D9.DB.STrails[D9.Config.STrailIndex].name .. " ▼")
D9.UI.BSTr.MouseButton1Click:Connect(function() D9.Funcs.OpenOvl(L("ТРОПА СКОРОСТИ", "SPEED TRAIL"), D9.DB.STrails, function(i) D9.Config.STrailIndex = i; D9.UI.BSTr.Text = L("✨ ТРОПА СКОР.: ", "✨ SPEED TRAIL: ") .. D9.DB.STrails[i].name .. " ▼" end) end)

local function MkSld(p, t, min, max, val, var)
    local f = Instance.new("Frame", p); f.Size = UDim2.new(1, -20, 0, 45); f.BackgroundColor3 = D9.Theme.BgPanel; f.ZIndex = 30; Instance.new("UICorner", f).CornerRadius = UDim.new(0, 8)
    local l = Instance.new("TextLabel", f); l.Size = UDim2.new(1, -20, 0, 20); l.Position = UDim2.new(0, 10, 0, 5); l.BackgroundTransparency = 1; l.Text = t.." ["..val.."]"; l.TextColor3 = D9.Theme.TextWhite; l.TextXAlignment = Enum.TextXAlignment.Left; l.TextSize = 11; l.ZIndex = 31; D9.Funcs.RegisterText(l)
    local bg = Instance.new("Frame", f); bg.Size = UDim2.new(1, -20, 0, 4); bg.Position = UDim2.new(0, 10, 0, 30); bg.BackgroundColor3 = D9.Theme.BgMain; bg.ZIndex = 31; Instance.new("UICorner", bg).CornerRadius = UDim.new(1, 0)
    local fl = Instance.new("Frame", bg); fl.Size = UDim2.new((val-min)/(max-min), 0, 1, 0); fl.BackgroundColor3 = D9.Theme.AccentGreen; fl.ZIndex = 32; Instance.new("UICorner", fl).CornerRadius = UDim.new(1, 0); local fg = Instance.new("UIGradient", fl); fg.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, D9.Theme.AccentBlue), ColorSequenceKeypoint.new(1, D9.Theme.AccentGreen)}); fg.Rotation = 45
    local kb = Instance.new("TextButton", bg); kb.Size = UDim2.new(0, 12, 0, 12); kb.Position = UDim2.new((val-min)/(max-min), -6, 0.5, -6); kb.BackgroundColor3 = D9.Theme.TextWhite; kb.Text = ""; kb.ZIndex = 33; Instance.new("UICorner", kb).CornerRadius = UDim.new(1, 0); local ks = Instance.new("UIStroke", kb); ks.Color = D9.Theme.AccentGreen; ks.Thickness = 2
    local d = false; kb.MouseButton1Down:Connect(function() d = true end); D9.Core.UIS.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then d = false end end)
    D9.Core.UIS.InputChanged:Connect(function(i) if d and i.UserInputType == Enum.UserInputType.MouseMovement then local pct = math.clamp((i.Position.X - bg.AbsolutePosition.X)/bg.AbsoluteSize.X, 0, 1); local v = math.floor(min + (pct*(max-min))); D9.Config[var] = v; l.Text = t.." ["..v.."]"; D9.Core.TS:Create(fl, TweenInfo.new(0.1), {Size = UDim2.new(pct, 0, 1, 0)}):Play(); D9.Core.TS:Create(kb, TweenInfo.new(0.1), {Position = UDim2.new(pct, -6, 0.5, -6)}):Play() end end)
end
MkSld(PgSpd, L("🏃 СКОРОСТЬ", "🏃 WALK SPEED"), 16, 250, D9.Config.WalkSpeed, "WalkSpeed"); MkSld(PgSpd, L("⬆️ ПРЫЖОК", "⬆️ JUMP POWER"), 50, 500, D9.Config.JumpPower, "JumpPower"); MkSld(PgSpd, L("✈️ ПОЛЁТ", "✈️ FLY SPEED"), 10, 500, D9.Config.FlySpeed, "FlySpeed")

D9.Funcs.TogEnf = function()
    D9.Config.EnforceSpeed = not D9.Config.EnforceSpeed
    if D9.Config.EnforceSpeed then
        D9.Funcs.SetActive(D9.UI.BEnf, L("⚡ ПРИМЕНЯТЬ К ИГРОКУ: ВКЛ", "⚡ ENFORCE SPEED: ON"), D9.Theme.AccentGreen); local c = D9.Core.Player.Character; if not c then return end; local hrp = c:FindFirstChild("HumanoidRootPart"); local hd = c:FindFirstChild("Head"); local hum = c:FindFirstChild("Humanoid"); if hum then hum.UseJumpPower = true end
        if hrp then D9.Cache.SpeedObj.Att0 = Instance.new("Attachment", hrp); D9.Cache.SpeedObj.Att0.Position = Vector3.new(-0.6, -2.5, 0); D9.Cache.SpeedObj.Att1 = Instance.new("Attachment", hrp); D9.Cache.SpeedObj.Att1.Position = Vector3.new(0.6, -2.5, 0); D9.Cache.SpeedObj.Trail = Instance.new("Trail", hrp); D9.Cache.SpeedObj.Trail.Attachment0 = D9.Cache.SpeedObj.Att0; D9.Cache.SpeedObj.Trail.Attachment1 = D9.Cache.SpeedObj.Att1; local cd = D9.DB.STrails[D9.Config.STrailIndex]; D9.Cache.SpeedObj.Trail.Color = ColorSequence.new(cd.c1, cd.c2); D9.Cache.SpeedObj.Trail.Lifetime = 0.35; D9.Cache.SpeedObj.Trail.LightEmission = 1; D9.Cache.SpeedObj.Trail.WidthScale = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(1,0)}); D9.Cache.SpeedObj.Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.4), NumberSequenceKeypoint.new(1,1)}) end
        if hd then local cd = D9.DB.STrails[D9.Config.STrailIndex]; D9.Cache.SpeedObj.Halo = Instance.new("Part", c); D9.Cache.SpeedObj.Halo.Size = Vector3.new(1, 1, 1); D9.Cache.SpeedObj.Halo.Transparency = 0.15; D9.Cache.SpeedObj.Halo.Anchored = false; D9.Cache.SpeedObj.Halo.CanCollide = false; D9.Cache.SpeedObj.Halo.Massless = true; D9.Cache.SpeedObj.Halo.Material = Enum.Material.Neon; D9.Cache.SpeedObj.Halo.Color = cd.c1; local mesh = Instance.new("SpecialMesh", D9.Cache.SpeedObj.Halo); mesh.MeshType = Enum.MeshType.FileMesh; mesh.MeshId = "rbxassetid://3270017"; mesh.Scale = Vector3.new(1.6, 1.6, 0.6); D9.Cache.SpeedObj.HaloWeld = Instance.new("Weld", D9.Cache.SpeedObj.Halo); D9.Cache.SpeedObj.HaloWeld.Part0 = hd; D9.Cache.SpeedObj.HaloWeld.Part1 = D9.Cache.SpeedObj.Halo; D9.Cache.SpeedObj.HaloWeld.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(90), 0, 0) end
    else
        D9.Funcs.SetInactive(D9.UI.BEnf, L("⚡ ПРИМЕНЯТЬ К ИГРОКУ: ВЫКЛ", "⚡ ENFORCE SPEED: OFF")); local hum = D9.Core.Player.Character and D9.Core.Player.Character:FindFirstChild("Humanoid"); if hum then hum.WalkSpeed = 16; hum.JumpPower = 50 end
        if D9.Cache.SpeedObj.Trail then D9.Cache.SpeedObj.Trail:Destroy(); D9.Cache.SpeedObj.Trail = nil; D9.Cache.SpeedObj.Att0:Destroy(); D9.Cache.SpeedObj.Att1:Destroy() end
        if D9.Cache.SpeedObj.Halo then D9.Cache.SpeedObj.Halo:Destroy(); D9.Cache.SpeedObj.Halo = nil; D9.Cache.SpeedObj.HaloWeld = nil end
    end
end
D9.UI.BEnf.MouseButton1Click:Connect(D9.Funcs.TogEnf)

-- ==========================================
-- ФУНКЦИОНАЛ: ESP И ШЕЙДЕРЫ
-- ==========================================
D9.UI.BEsp = D9.Funcs.CreateButton(PgEsp, L("👁️ ВАЛЛХАК (ESP): ВЫКЛ", "👁️ WALLHACK (ESP): OFF"))
D9.UI.BEnm = D9.Funcs.CreateButton(PgEsp, L("🔤 ИМЕНА И ХП: ВЫКЛ", "🔤 NAMES & HP: OFF"))
D9.UI.BEbx = D9.Funcs.CreateButton(PgEsp, L("📦 ПОДСВЕТКА: ВЫКЛ", "📦 HIGHLIGHT BOX: OFF"))
D9.UI.BEtr = D9.Funcs.CreateButton(PgEsp, L("〰️ ЛИНИИ: ВЫКЛ", "〰 TRACERS: OFF"))

D9.Funcs.ClrESP = function() D9.UI.ESPFolder:ClearAllChildren() end
D9.Funcs.TogEspM = function(s) D9.Config.ESP = s; if D9.Config.ESP then D9.Funcs.SetActive(D9.UI.BEsp, L("👁️ ВАЛЛХАК (ESP): ВКЛ", "👁️ WALLHACK (ESP): ON"), D9.Theme.AccentRed) else D9.Funcs.SetInactive(D9.UI.BEsp, L("👁️ ВАЛЛХАК (ESP): ВЫКЛ", "👁️ WALLHACK (ESP): OFF")); D9.Funcs.ClrESP() end end
D9.UI.BEsp.MouseButton1Click:Connect(function() D9.Funcs.TogEspM(not D9.Config.ESP) end)
D9.UI.BEnm.MouseButton1Click:Connect(function() D9.Config.ESPNames = not D9.Config.ESPNames; if D9.Config.ESPNames then D9.Funcs.SetActive(D9.UI.BEnm, L("🔤 ИМЕНА И ХП: ВКЛ", "🔤 NAMES & HP: ON"), D9.Theme.AccentRed) else D9.Funcs.SetInactive(D9.UI.BEnm, L("🔤 ИМЕНА И ХП: ВЫКЛ", "🔤 NAMES & HP: OFF")); D9.Funcs.ClrESP() end end)
D9.UI.BEbx.MouseButton1Click:Connect(function() D9.Config.ESPBoxes = not D9.Config.ESPBoxes; if D9.Config.ESPBoxes then D9.Funcs.SetActive(D9.UI.BEbx, L("📦 ПОДСВЕТКА: ВКЛ", "📦 HIGHLIGHT BOX: ON"), D9.Theme.AccentRed) else D9.Funcs.SetInactive(D9.UI.BEbx, L("📦 ПОДСВЕТКА: ВЫКЛ", "📦 HIGHLIGHT BOX: OFF")); D9.Funcs.ClrESP() end end)
D9.UI.BEtr.MouseButton1Click:Connect(function() D9.Config.ESPTracers = not D9.Config.ESPTracers; if D9.Config.ESPTracers then D9.Funcs.SetActive(D9.UI.BEtr, L("〰️ ЛИНИИ: ВКЛ", "〰️ TRACERS: ON"), D9.Theme.AccentRed) else D9.Funcs.SetInactive(D9.UI.BEtr, L("〰️ ЛИНИИ: ВЫКЛ", "〰️ TRACERS: OFF")); D9.Funcs.ClrESP() end end)

D9.UI.BShd = D9.Funcs.CreateButton(PgShd, L("🎨 ШЕЙДЕРЫ: ВЫКЛ", "🎨 SHADERS: OFF"))
D9.UI.BShdC = D9.Funcs.CreateButton(PgShd, L("🌈 ТИП: ", "🌈 TYPE: ") .. D9.DB.Shaders[D9.Config.ShaderIndex].name .. " ▼")
D9.Funcs.UpdShd = function()
    if not D9.Config.ShadersActive then pcall(function() D9.Cache.VisualFX.ColorCorrection.Enabled = false; D9.Cache.VisualFX.Bloom.Enabled = false; D9.Cache.VisualFX.SunRays.Enabled = false end); D9.Funcs.SetInactive(D9.UI.BShd, L("🎨 ШЕЙДЕРЫ: ВЫКЛ", "🎨 SHADERS: OFF"))
    else local p = D9.DB.Shaders[D9.Config.ShaderIndex]; pcall(function() D9.Cache.VisualFX.ColorCorrection.Enabled = true; D9.Cache.VisualFX.ColorCorrection.Brightness = p.b; D9.Cache.VisualFX.ColorCorrection.Contrast = p.c; D9.Cache.VisualFX.ColorCorrection.Saturation = p.s; D9.Cache.VisualFX.ColorCorrection.TintColor = p.t; D9.Cache.VisualFX.Bloom.Enabled = true; D9.Cache.VisualFX.Bloom.Intensity = p.blI; D9.Cache.VisualFX.Bloom.Size = p.blS; D9.Cache.VisualFX.Bloom.Threshold = p.blT; D9.Cache.VisualFX.SunRays.Enabled = true; D9.Cache.VisualFX.SunRays.Intensity = p.sr end); D9.Funcs.SetActive(D9.UI.BShd, L("🎨 ШЕЙДЕРЫ: ", "🎨 SHADERS: ") .. p.name, p.acc) end
end
D9.UI.BShd.MouseButton1Click:Connect(function() D9.Config.ShadersActive = not D9.Config.ShadersActive; D9.Funcs.UpdShd() end)
D9.UI.BShdC.MouseButton1Click:Connect(function() D9.Funcs.OpenOvl(L("ВЫБЕРИТЕ ШЕЙДЕР", "SELECT SHADER"), D9.DB.Shaders, function(idx) D9.Config.ShaderIndex = idx; D9.UI.BShdC.Text = L("🌈 ТИП: ", "🌈 TYPE: ") .. D9.DB.Shaders[idx].name .. " ▼"; if D9.Config.ShadersActive then D9.Funcs.UpdShd() end end) end)

-- ==========================================
-- ФУНКЦИОНАЛ: ПРИЗРАК И X-RAY
-- ==========================================
D9.UI.BNcl = D9.Funcs.CreateButton(PgNcl, "👻 NOCLIP: " .. L("ВЫКЛ", "OFF") .. " [N]")
D9.Funcs.TogNcl = function(s) if s ~= nil then D9.Config.Noclip = s else D9.Config.Noclip = not D9.Config.Noclip end; if D9.Config.Noclip then D9.Funcs.SetActive(D9.UI.BNcl, "👻 NOCLIP: " .. L("ВКЛ", "ON") .. " [N]", D9.Theme.TextGray) else D9.Funcs.SetInactive(D9.UI.BNcl, "👻 NOCLIP: " .. L("ВЫКЛ", "OFF") .. " [N]") end end
D9.UI.BNcl.MouseButton1Click:Connect(function() D9.Funcs.TogNcl() end)

D9.UI.BXry = D9.Funcs.CreateButton(PgXry, "👀 X-RAY: " .. L("ВЫКЛ", "OFF") .. " [Z]")
D9.Funcs.TogXry = function()
    D9.Config.XRay = not D9.Config.XRay
    if D9.Config.XRay then
        D9.Funcs.SetActive(D9.UI.BXry, "👀 X-RAY: " .. L("ВКЛ", "ON") .. " [Z]", D9.Theme.AccentYellow)
        for _, o in ipairs(workspace:GetDescendants()) do if o:IsA("BasePart") and o.Parent and not o.Parent:FindFirstChild("Humanoid") then if o.Transparency < 0.5 then D9.Cache.XRayTransparencies[o] = o.Transparency; o.Transparency = 0.5 end end end
    else
        D9.Funcs.SetInactive(D9.UI.BXry, "👀 X-RAY: " .. L("ВЫКЛ", "OFF") .. " [Z]")
        for o, t in pairs(D9.Cache.XRayTransparencies) do if o and o.Parent then o.Transparency = t end end; D9.Cache.XRayTransparencies = {}
    end
end
D9.UI.BXry.MouseButton1Click:Connect(D9.Funcs.TogXry)

-- ==========================================
-- ФУНКЦИОНАЛ: ВНЕШНИЕ СКРИПТЫ И ПОИСК
-- ==========================================
D9.UI.BVrx = D9.Funcs.CreateButton(PgScr, L("🚀 ВНЕШНИЙ HUB (VERTEX)", "🚀 EXTERNAL HUB (VERTEX)"))
D9.UI.BVrx.MouseButton1Click:Connect(function() D9.UI.BVrx.Text = L("⏳ ЗАПУСК...", "⏳ LAUNCHING..."); task.spawn(function() pcall(function() loadstring(game:HttpGet('https://raw.smokingscripts.org/vertex.lua'))() end) end); task.wait(1); D9.Funcs.SetActive(D9.UI.BVrx, L("✅ УСПЕШНО", "✅ SUCCESS"), D9.Theme.AccentCyan); task.wait(2); D9.Funcs.SetInactive(D9.UI.BVrx, L("🚀 ВНЕШНИЙ HUB (VERTEX)", "🚀 EXTERNAL HUB (VERTEX)")) end)

D9.UI.SFr = Instance.new("Frame", PgSrc); D9.UI.SFr.Size = UDim2.new(1, -20, 0, 35); D9.UI.SFr.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.SFr.ZIndex = 30; Instance.new("UICorner", D9.UI.SFr).CornerRadius = UDim.new(0, 8); local ss = Instance.new("UIStroke", D9.UI.SFr); ss.Color = D9.Theme.AccentBlue
D9.UI.SBx = Instance.new("TextBox", D9.UI.SFr); D9.UI.SBx.Size = UDim2.new(1, -10, 1, 0); D9.UI.SBx.Position = UDim2.new(0, 5, 0, 0); D9.UI.SBx.BackgroundTransparency = 1; D9.UI.SBx.TextColor3 = D9.Theme.TextWhite; D9.UI.SBx.PlaceholderText = L("Название игры (на англ)...", "Game name (in English)..."); D9.UI.SBx.TextXAlignment = Enum.TextXAlignment.Left; D9.UI.SBx.ZIndex = 31; D9.Funcs.RegisterText(D9.UI.SBx)
D9.UI.BSrc = D9.Funcs.CreateButton(PgSrc, L("🔍 НАЙТИ В БАЗЕ", "🔍 SEARCH IN DATABASE"))
D9.UI.BCur = D9.Funcs.CreateButton(PgSrc, L("🎯 СКРИПТЫ НА ТЕКУЩУЮ ИГРУ", "🎯 SCRIPTS FOR CURRENT GAME")); D9.UI.BCur.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.BCur.TextColor3 = D9.Theme.AccentGreen

D9.Funcs.RSearch = function(q)
    if q == "" then return end; D9.UI.BSrc.Text = L("⏳ ИЩЕМ В SCRIPTBLOX...", "⏳ SEARCHING SCRIPTBLOX...")
    for _, c in ipairs(PgSrc:GetChildren()) do if c.Name == "SRes" then c:Destroy() end end
    task.spawn(function()
        local s, r = pcall(function() return D9.Core.Http:JSONDecode(game:HttpGet("https://scriptblox.com/api/script/search?q="..D9.Core.Http:UrlEncode(q).."&mode=free&max=10")) end)
        if s and r.result and r.result.scripts then
            local count = 0
            for i, sd in ipairs(r.result.scripts) do
                count = count + 1
                local rf = Instance.new("Frame", PgSrc); rf.Name = "SRes"; rf.Size = UDim2.new(1, -20, 0, 65); rf.BackgroundColor3 = D9.Theme.BgPanel; rf.ZIndex = 30; Instance.new("UICorner", rf).CornerRadius = UDim.new(0, 8)
                local rt = Instance.new("TextLabel", rf); rt.Size = UDim2.new(1, -20, 0, 20); rt.Position = UDim2.new(0, 10, 0, 8); rt.BackgroundTransparency = 1; rt.Text = string.sub(sd.title, 1, 30) .. "..."; rt.TextColor3 = D9.Theme.TextWhite; rt.TextXAlignment = Enum.TextXAlignment.Left; rt.Font = Enum.Font.GothamBold; rt.TextSize = 11; rt.ZIndex = 31
                local rr = Instance.new("TextButton", rf); rr.Size = UDim2.new(0.65, 0, 0, 24); rr.Position = UDim2.new(0, 10, 0, 32); rr.BackgroundColor3 = D9.Theme.ButtonBase; rr.TextColor3 = D9.Theme.AccentGreen; rr.Text = L("▶ ЗАПУСК", "▶ EXECUTE"); rr.Font = Enum.Font.GothamBold; rr.TextSize = 10; rr.ZIndex = 31; Instance.new("UICorner", rr).CornerRadius = UDim.new(0, 6)
                local rc = Instance.new("TextButton", rf); rc.Size = UDim2.new(0.25, 0, 0, 24); rc.Position = UDim2.new(0.7, 0, 0, 32); rc.BackgroundColor3 = D9.Theme.ButtonBase; rc.TextColor3 = D9.Theme.TextWhite; rc.Text = "📋"; rc.Font = Enum.Font.GothamBold; rc.TextSize = 10; rc.ZIndex = 31; Instance.new("UICorner", rc).CornerRadius = UDim.new(0, 6)
                rr.MouseButton1Click:Connect(function() pcall(function() loadstring(sd.script)() end) end); rc.MouseButton1Click:Connect(function() if D9.Core.SupportsClipboard then setclipboard(sd.script) end end)
            end
            D9.UI.BSrc.Text = L("✅ НАЙДЕНО: ", "✅ FOUND: ") .. count
        else D9.UI.BSrc.Text = L("❌ ОШИБКА ИЛИ ПУСТО", "❌ ERROR OR EMPTY") end
        task.wait(2); D9.UI.BSrc.Text = L("🔍 НАЙТИ В БАЗЕ", "🔍 SEARCH IN DATABASE")
    end)
end
D9.UI.BSrc.MouseButton1Click:Connect(function() D9.Funcs.RSearch(D9.UI.SBx.Text) end)
D9.UI.BCur.MouseButton1Click:Connect(function() pcall(function() local i = D9.Core.Market:GetProductInfo(game.PlaceId); if i and i.Name then D9.UI.SBx.Text = i.Name; D9.Funcs.RSearch(i.Name) end end) end)

-- ==========================================
-- ФУНКЦИОНАЛ: ИНТЕГРИРОВАННАЯ IDE
-- ==========================================
D9.UI.ITp = Instance.new("ScrollingFrame", PgIde); D9.UI.ITp.Size = UDim2.new(1, -20, 0, 30); D9.UI.ITp.BackgroundTransparency = 1; D9.UI.ITp.ScrollingDirection = Enum.ScrollingDirection.X; D9.UI.ITp.AutomaticCanvasSize = Enum.AutomaticSize.X; D9.UI.ITp.ScrollBarThickness = 0; D9.UI.ITp.ZIndex = 30; local il = Instance.new("UIListLayout", D9.UI.ITp); il.FillDirection = Enum.FillDirection.Horizontal; il.Padding = UDim.new(0, 5)
local IdeScCount = 1
D9.UI.ITb1 = Instance.new("TextButton", D9.UI.ITp); D9.UI.ITb1.Size = UDim2.new(0, 90, 1, 0); D9.UI.ITb1.BackgroundColor3 = D9.Theme.BgPanel; D9.UI.ITb1.TextColor3 = D9.Theme.TextWhite; D9.UI.ITb1.Text = "Script 1"; D9.UI.ITb1.ZIndex = 31; Instance.new("UICorner", D9.UI.ITb1).CornerRadius = UDim.new(0, 6); D9.Funcs.RegisterText(D9.UI.ITb1)
D9.UI.IAd = Instance.new("TextButton", D9.UI.ITp); D9.UI.IAd.Size = UDim2.new(0, 30, 0, 30); D9.UI.IAd.BackgroundColor3 = D9.Theme.BgMain; D9.UI.IAd.TextColor3 = D9.Theme.TextGray; D9.UI.IAd.Text = "+"; D9.UI.IAd.ZIndex = 31; Instance.new("UICorner", D9.UI.IAd).CornerRadius = UDim.new(0, 6); D9.Funcs.RegisterText(D9.UI.IAd)
D9.UI.IAc = Instance.new("Frame", PgIde); D9.UI.IAc.Size = UDim2.new(1, -20, 0, 30); D9.UI.IAc.BackgroundTransparency = 1; D9.UI.IAc.ZIndex = 30
D9.UI.IEx = Instance.new("TextButton", D9.UI.IAc); D9.UI.IEx.Size = UDim2.new(0.48, 0, 1, 0); D9.UI.IEx.BackgroundColor3 = D9.Theme.ButtonBase; D9.UI.IEx.TextColor3 = D9.Theme.AccentGreen; D9.UI.IEx.Text = L("▶ ЗАПУСК", "▶ EXECUTE"); D9.UI.IEx.ZIndex = 31; Instance.new("UICorner", D9.UI.IEx).CornerRadius = UDim.new(0, 6); D9.Funcs.RegisterText(D9.UI.IEx); D9.Funcs.CreateHover(D9.UI.IEx)
D9.UI.ICl = Instance.new("TextButton", D9.UI.IAc); D9.UI.ICl.Size = UDim2.new(0.48, 0, 1, 0); D9.UI.ICl.Position = UDim2.new(0.52, 0, 0, 0); D9.UI.ICl.BackgroundColor3 = D9.Theme.ButtonBase; D9.UI.ICl.TextColor3 = D9.Theme.AccentRed; D9.UI.ICl.Text = L("🗑 ОЧИСТИТЬ", "🗑 CLEAR"); D9.UI.ICl.ZIndex = 31; Instance.new("UICorner", D9.UI.ICl).CornerRadius = UDim.new(0, 6); D9.Funcs.RegisterText(D9.UI.ICl); D9.Funcs.CreateHover(D9.UI.ICl)
D9.UI.ISc = Instance.new("ScrollingFrame", PgIde); D9.UI.ISc.Size = UDim2.new(1, -20, 0, 230); D9.UI.ISc.BackgroundColor3 = D9.Theme.BgMain; D9.UI.ISc.ScrollBarThickness = 4; D9.UI.ISc.ZIndex = 30; Instance.new("UICorner", D9.UI.ISc).CornerRadius = UDim.new(0, 8)
D9.UI.IBx = Instance.new("TextBox", D9.UI.ISc); D9.UI.IBx.Size = UDim2.new(1, -10, 1, -10); D9.UI.IBx.Position = UDim2.new(0, 5, 0, 5); D9.UI.IBx.BackgroundTransparency = 1; D9.UI.IBx.TextColor3 = D9.Theme.TextWhite; D9.UI.IBx.Text = "print('Deskret9 IDE')\n"; D9.UI.IBx.TextXAlignment = Enum.TextXAlignment.Left; D9.UI.IBx.TextYAlignment = Enum.TextYAlignment.Top; D9.UI.IBx.ClearTextOnFocus = false; D9.UI.IBx.MultiLine = true; D9.UI.IBx.Font = Enum.Font.Code; D9.UI.IBx.TextSize = 13; D9.UI.IBx.ZIndex = 31
D9.UI.IEx.MouseButton1Click:Connect(function() pcall(function() local f, e = loadstring(D9.UI.IBx.Text); if f then task.spawn(f) else warn("IDE Error: " .. tostring(e)) end end) end)
D9.UI.ICl.MouseButton1Click:Connect(function() D9.UI.IBx.Text = "" end)
D9.UI.IAd.MouseButton1Click:Connect(function() IdeScCount = IdeScCount + 1; local n = Instance.new("TextButton", D9.UI.ITp); n.Size = UDim2.new(0, 90, 1, 0); n.BackgroundColor3 = D9.Theme.ButtonBase; n.TextColor3 = D9.Theme.TextGray; n.Text = "Script " .. IdeScCount; n.ZIndex = 31; Instance.new("UICorner", n).CornerRadius = UDim.new(0, 6); D9.Funcs.RegisterText(n); D9.UI.IAd.LayoutOrder = IdeScCount; D9.UI.IBx.Text = "-- New Script " .. IdeScCount .. "\n" end)

-- ==========================================
-- ФУНКЦИОНАЛ: ИИ АССИСТЕНТ
-- ==========================================
D9.UI.CDs = Instance.new("ScrollingFrame", PgAI); D9.UI.CDs.Size = UDim2.new(1, -20, 0, 180); D9.UI.CDs.BackgroundColor3 = D9.Theme.BgMain; D9.UI.CDs.ScrollBarThickness = 4; D9.UI.CDs.ZIndex = 30; Instance.new("UICorner", D9.UI.CDs).CornerRadius = UDim.new(0, 8); local cl = Instance.new("UIListLayout", D9.UI.CDs); cl.Padding = UDim.new(0, 5); cl.SortOrder = Enum.SortOrder.LayoutOrder
D9.UI.CInF = Instance.new("Frame", PgAI); D9.UI.CInF.Size = UDim2.new(1, -20, 0, 35); D9.UI.CInF.BackgroundColor3 = D9.Theme.BgMain; D9.UI.CInF.ZIndex = 30; Instance.new("UICorner", D9.UI.CInF).CornerRadius = UDim.new(0, 8); local cstr = Instance.new("UIStroke", D9.UI.CInF); cstr.Color = D9.Theme.AccentPurple
D9.UI.CInB = Instance.new("TextBox", D9.UI.CInF); D9.UI.CInB.Size = UDim2.new(1, -40, 1, 0); D9.UI.CInB.Position = UDim2.new(0, 5, 0, 0); D9.UI.CInB.BackgroundTransparency = 1; D9.UI.CInB.TextColor3 = D9.Theme.TextWhite; D9.UI.CInB.PlaceholderText = L("вкл полет / иди к [имя]...", "fly on / go to [name]..."); D9.UI.CInB.TextXAlignment = Enum.TextXAlignment.Left; D9.UI.CInB.ZIndex = 31; D9.Funcs.RegisterText(D9.UI.CInB)
D9.UI.CSnd = Instance.new("TextButton", D9.UI.CInF); D9.UI.CSnd.Size = UDim2.new(0, 35, 1, 0); D9.UI.CSnd.Position = UDim2.new(1, -35, 0, 0); D9.UI.CSnd.BackgroundTransparency = 1; D9.UI.CSnd.Text = "➤"; D9.UI.CSnd.TextColor3 = D9.Theme.AccentPurple; D9.UI.CSnd.TextSize = 18; D9.UI.CSnd.ZIndex = 31
D9.UI.CPrF = Instance.new("Frame", PgAI); D9.UI.CPrF.Size = UDim2.new(1, -20, 0, 70); D9.UI.CPrF.BackgroundColor3 = Color3.fromRGB(40, 20, 20); D9.UI.CPrF.Visible = false; D9.UI.CPrF.ZIndex = 40; Instance.new("UICorner", D9.UI.CPrF).CornerRadius = UDim.new(0, 8); local cps = Instance.new("UIStroke", D9.UI.CPrF); cps.Color = D9.Theme.AccentRed
D9.UI.PrT = Instance.new("TextLabel", D9.UI.CPrF); D9.UI.PrT.Size = UDim2.new(1, 0, 0, 35); D9.UI.PrT.BackgroundTransparency = 1; D9.UI.PrT.Text = L("ИИ: Путь заблокирован. Юзать Noclip?", "AI: Path blocked. Use Noclip?"); D9.UI.PrT.TextColor3 = D9.Theme.TextWhite; D9.UI.PrT.ZIndex = 41; D9.Funcs.RegisterText(D9.UI.PrT)
D9.UI.PY = Instance.new("TextButton", D9.UI.CPrF); D9.UI.PY.Size = UDim2.new(0.45, 0, 0, 25); D9.UI.PY.Position = UDim2.new(0.025, 0, 0, 35); D9.UI.PY.BackgroundColor3 = D9.Theme.AccentGreen; D9.UI.PY.Text = L("ДА", "YES"); D9.UI.PY.ZIndex = 41; Instance.new("UICorner", D9.UI.PY).CornerRadius = UDim.new(0, 6)
D9.UI.PN = Instance.new("TextButton", D9.UI.CPrF); D9.UI.PN.Size = UDim2.new(0.45, 0, 0, 25); D9.UI.PN.Position = UDim2.new(0.525, 0, 0, 35); D9.UI.PN.BackgroundColor3 = D9.Theme.AccentRed; D9.UI.PN.Text = L("НЕТ", "NO"); D9.UI.PN.ZIndex = 41; Instance.new("UICorner", D9.UI.PN).CornerRadius = UDim.new(0, 6)

D9.Funcs.AddMsg = function(sn, tx, cl)
    local f = Instance.new("Frame", D9.UI.CDs); f.Size = UDim2.new(1, -10, 0, 30); f.BackgroundTransparency = 1; f.ZIndex = 31
    local l = Instance.new("TextLabel", f); l.Size = UDim2.new(1, 0, 1, 0); l.BackgroundTransparency = 1; l.Text = ""; l.TextColor3 = cl; l.TextXAlignment = Enum.TextXAlignment.Left; l.TextWrapped = true; l.ZIndex = 32; D9.Funcs.RegisterText(l)
    D9.UI.CDs.CanvasPosition = Vector2.new(0, 9999)
    task.spawn(function() local ft = "[" .. sn .. "]: " .. tx; for i = 1, #ft do l.Text = string.sub(ft, 1, i); task.wait(0.01) end; f.Size = UDim2.new(1, -10, 0, l.TextBounds.Y + 10); D9.UI.CDs.CanvasPosition = Vector2.new(0, 9999) end)
end
D9.Funcs.AddMsg("System", L("Я ИИ-Ассистент Deskret9. Напиши 'команды', 'вкл полет', 'кто ты' или 'иди к [имя]'.", "I am Deskret9 AI. Type 'commands', 'fly on', 'who are you', or 'go to [name]'."), D9.Theme.AccentPurple)

D9.Funcs.AutoWlk = function(pos)
    local c = D9.Core.Player.Character; if not c then return end; local h = c:FindFirstChild("Humanoid"); local hrp = c:FindFirstChild("HumanoidRootPart"); if not h or not hrp then return end
    local p = D9.Core.Pathfinding:CreatePath({AgentRadius = 2, AgentHeight = 5, AgentCanJump = true})
    pcall(function() p:ComputeAsync(hrp.Position, pos) end)
    if p.Status == Enum.PathStatus.Success then
        local wps = p:GetWaypoints(); D9.Config.AIWalking = true
        task.spawn(function()
            for i = 1, #wps - 1 do local w1 = wps[i].Position; local w2 = wps[i+1].Position; local d = (w1 - w2).Magnitude; local l = Instance.new("Part", workspace); l.Size = Vector3.new(0.5, 0.5, d); l.CFrame = CFrame.new(w1, w2) * CFrame.new(0, 0, -d/2); l.Anchored = true; l.CanCollide = false; l.Material = Enum.Material.Neon; l.Color = D9.Theme.AccentCyan; table.insert(D9.Cache.VisualPath, l) end
            for _, wp in ipairs(wps) do if not D9.Config.AIWalking then break end; if wp.Action == Enum.PathWaypointAction.Jump then h.Jump = true end; h:MoveTo(wp.Position); h.MoveToFinished:Wait() end
            D9.Config.AIWalking = false; D9.Funcs.AddMsg("System", L("Маршрут завершен.", "Route finished."), D9.Theme.AccentGreen); for _, l in ipairs(D9.Cache.VisualPath) do l:Destroy() end; D9.Cache.VisualPath = {}
        end)
    else D9.UI.CPrF.Visible = true end
end

D9.Funcs.PAICmd = function(t)
    t = string.lower(t)
    if string.find(t, "привет") or string.find(t, "hello") then return L("Привет! Напиши 'команды'.", "Hi! Type 'commands'.")
    elseif string.find(t, "кто ты") or string.find(t, "who") then return L("Я Deskret9 AI. Управляю читами и строю лазерные пути.", "I am Deskret9 AI. I manage cheats and build laser paths.")
    elseif string.find(t, "совет") or string.find(t, "tip") then return D9.DB.Tips[math.random(1, #D9.DB.Tips)]
    elseif string.find(t, "команд") or string.find(t, "command") then return L("Команды: 'вкл полет', 'выкл полет', 'вкл есп', 'выкл есп', 'иди к [имя]', 'сделай день', 'очисти чат', 'стоп'.", "Commands: 'fly on/off', 'esp on/off', 'go to [name]', 'day time', 'clear chat', 'stop'.")
    elseif string.find(t, "полет") or string.find(t, "fly") then if string.find(t, "вкл") or string.find(t, "on") then D9.Funcs.TogFly(true); return L("Полет активирован.", "Fly ON.") elseif string.find(t, "вык") or string.find(t, "off") then D9.Funcs.TogFly(false); return L("Полет отключен.", "Fly OFF.") end
    elseif string.find(t, "есп") or string.find(t, "esp") then if string.find(t, "вкл") or string.find(t, "on") then D9.Funcs.TogEspM(true); return L("ESP включен.", "ESP ON.") elseif string.find(t, "вык") or string.find(t, "off") then D9.Funcs.TogEspM(false); return L("ESP отключен.", "ESP OFF.") end
    elseif string.find(t, "сделай день") or string.find(t, "day") then pcall(function() D9.Core.Lighting.ClockTime = 12 end); return L("Время установлено на день.", "Set to day time.")
    elseif string.find(t, "очисти чат") or string.find(t, "clear") then for _, c in ipairs(D9.UI.CDs:GetChildren()) do if c:IsA("Frame") then c:Destroy() end end; return L("Чат очищен.", "Chat cleared.")
    elseif string.find(t, "иди к") or string.find(t, "go to") then local tn = string.match(t, "иди к (%S+)") or string.match(t, "go to (%S+)"); local fP = nil; for _, p in ipairs(D9.Core.Players:GetPlayers()) do if string.lower(string.sub(p.Name, 1, #tn)) == tn or string.lower(string.sub(p.DisplayName, 1, #tn)) == tn then fP = p; break end end; if fP and fP.Character and fP.Character:FindFirstChild("HumanoidRootPart") then D9.Funcs.AutoWalkTo(fP.Character.HumanoidRootPart.Position); return L("Прокладываю маршрут к ", "Routing to ") .. fP.Name else return L("Не смог найти игрока.", "Player not found.") end
    elseif string.find(t, "стоп") or string.find(t, "stop") then D9.Config.AIWalking = false; for _, l in ipairs(D9.Cache.VisualPath) do l:Destroy() end; D9.Cache.VisualPath = {}; return L("Остановлено.", "Stopped.") end
    return L("Напиши 'команды', чтобы увидеть список.", "Type 'commands' for a list.")
end

D9.UI.CSnd.MouseButton1Click:Connect(function()
    local t = D9.UI.CInB.Text; if t == "" then return end
    D9.Funcs.AddMsg(L("Вы", "You"), t, D9.Theme.TextWhite); D9.UI.CInB.Text = ""
    local res = D9.Funcs.PAICmd(t); if res then task.spawn(function() task.wait(0.5); D9.Funcs.AddMsg("Deskret9 AI", res, D9.Theme.AccentCyan) end) end
end)
D9.UI.PY.MouseButton1Click:Connect(function() D9.UI.CPrF.Visible = false; D9.Funcs.TogNcl(true); D9.Funcs.AddMsg("System", L("Noclip активирован. Перезапустите маршрут.", "Noclip ON. Restart route."), D9.Theme.AccentGreen) end)
D9.UI.PN.MouseButton1Click:Connect(function() D9.UI.CPrF.Visible = false; D9.Funcs.AddMsg("ИИ", L("Отменено.", "Cancelled."), D9.Theme.AccentRed) end)

-- НАСТРОЙКИ СИСТЕМЫ
local EIF = Instance.new("Frame", PgSet); EIF.Size = UDim2.new(1, -20, 0, 45); EIF.BackgroundColor3 = D9.Theme.BgPanel; EIF.ZIndex = 30; Instance.new("UICorner", EIF).CornerRadius = UDim.new(0, 8)
local EIL = Instance.new("TextLabel", EIF); EIL.Size = UDim2.new(1, -16, 0, 20); EIL.Position = UDim2.new(0, 8, 0, 12); EIL.BackgroundTransparency = 1; EIL.Text = L("💻 ИНЖЕКТОР: ", "💻 EXECUTOR: ") .. string.sub(D9.Core.ExecutorName, 1, 20); EIL.TextColor3 = D9.Theme.AccentBlue; EIL.TextXAlignment = Enum.TextXAlignment.Left; EIL.ZIndex = 31; D9.Funcs.RegisterText(EIL)

local BWl = D9.Funcs.CreateButton(PgSet, L("🖼 ВЫБРАТЬ ОБОИ ▼", "🖼 SELECT WALLPAPER ▼"), 35); BWl.MouseButton1Click:Connect(function() D9.Funcs.OpenOvl(L("ВСТРОЕННЫЕ ОБОИ", "WALLPAPERS"), D9.DB.Wallpapers, function(i) D9.Config.Wallpaper = D9.DB.Wallpapers[i].id; D9.Funcs.UpdateWallpaper() end) end)
local BFt = D9.Funcs.CreateButton(PgSet, L("🔤 ШРИФТ: ", "🔤 FONT: ") .. D9.DB.Fonts[D9.Config.FontIndex].name, 35); BFt.MouseButton1Click:Connect(function() D9.Config.FontIndex = D9.Config.FontIndex + 1; if D9.Config.FontIndex > #D9.DB.Fonts then D9.Config.FontIndex = 1 end; BFt.Text = L("🔤 ШРИФТ: ", "🔤 FONT: ") .. D9.DB.Fonts[D9.Config.FontIndex].name; D9.Funcs.ApplyGlobalFont() end)

local BF1 = D9.Funcs.CreateButton(PgSet, L("⚡ FPS 1.0 (ТЕНИ): ВЫКЛ", "⚡ FPS 1.0 (SHADOWS): OFF"), 35); local BF2 = D9.Funcs.CreateButton(PgSet, L("🥔 FPS 2.0 (POTATO): ВЫКЛ", "🥔 FPS 2.0 (POTATO): OFF"), 35); local OrigSh = D9.Core.Lighting.GlobalShadows
BF1.MouseButton1Click:Connect(function() D9.Config.FPSBoost1 = not D9.Config.FPSBoost1; if D9.Config.FPSBoost1 then pcall(function() D9.Core.Lighting.GlobalShadows = false end); for _, o in ipairs(workspace:GetDescendants()) do if o:IsA("ParticleEmitter") or o:IsA("Trail") then o.Enabled = false; table.insert(D9.Cache.DisabledFX, o) end end; D9.Funcs.SetActive(BF1, L("⚡ FPS 1.0 (ТЕНИ): ВКЛ", "⚡ FPS 1.0 (SHADOWS): ON"), D9.Theme.AccentGreen) else pcall(function() D9.Core.Lighting.GlobalShadows = OrigSh end); for _, o in ipairs(D9.Cache.DisabledFX) do if o and o.Parent then o.Enabled = true end end; D9.Cache.DisabledFX = {}; D9.Funcs.SetInactive(BF1, L("⚡ FPS 1.0 (ТЕНИ): ВЫКЛ", "⚡ FPS 1.0 (SHADOWS): OFF")) end end)
BF2.MouseButton1Click:Connect(function() D9.Config.FPSBoost2 = not D9.Config.FPSBoost2; if D9.Config.FPSBoost2 then for _, o in ipairs(workspace:GetDescendants()) do if o:IsA("BasePart") and not o:IsDescendantOf(D9.Core.Player.Character) then D9.Cache.SavedMaterials[o] = {m = o.Material, r = o.Reflectance}; o.Material = Enum.Material.SmoothPlastic; o.Reflectance = 0 elseif o:IsA("Texture") or o:IsA("Decal") then if o.Transparency < 1 then D9.Cache.SavedTextures[o] = o.Transparency; o.Transparency = 1 end end end; D9.Funcs.SetActive(BF2, L("🥔 FPS 2.0 (POTATO): ВКЛ", "🥔 FPS 2.0 (POTATO): ON"), D9.Theme.AccentOrange) else for p, d in pairs(D9.Cache.SavedMaterials) do if p and p.Parent then p.Material = d.m; p.Reflectance = d.r end end; for t, tr in pairs(D9.Cache.SavedTextures) do if t and t.Parent then t.Transparency = tr end end; D9.Cache.SavedMaterials = {}; D9.Cache.SavedTextures = {}; D9.Funcs.SetInactive(BF2, L("🥔 FPS 2.0 (POTATO): ВЫКЛ", "🥔 FPS 2.0 (POTATO): OFF")) end end)

-- ==========================================
-- ОБРАБОТЧИК КЛАВИШ И ИГРОВОЙ ЦИКЛ
-- ==========================================
D9.Core.UIS.InputBegan:Connect(function(i, gp)
    if gp or D9.Core.UIS:GetFocusedTextBox() ~= nil then return end
    D9.Cache.KeysDown[i.KeyCode] = true
    local k = i.KeyCode
    if k == Enum.KeyCode.RightControl or k == Enum.KeyCode.RightShift or k == Enum.KeyCode.Insert then D9.Funcs.ToggleMinimize()
    elseif k == Enum.KeyCode.E then D9.Funcs.TogFly()
    elseif k == Enum.KeyCode.Q then D9.Funcs.TogCam("Drone")
    elseif k == Enum.KeyCode.X then D9.Funcs.TogCam("Spectator")
    elseif k == Enum.KeyCode.N then D9.Funcs.TogNcl()
    elseif k == Enum.KeyCode.Z then D9.Funcs.TogXry()
    elseif k == Enum.KeyCode.LeftAlt or k == Enum.KeyCode.LeftShift then if D9.Config.EnforceSpeed and not D9.Config.IsFlying then D9.Funcs.TrigAwk() end end
end)
D9.Core.UIS.InputEnded:Connect(function(i, gp) D9.Cache.KeysDown[i.KeyCode] = false end)
local function IsKD(k) return D9.Cache.KeysDown[k] == true end

local fCnt, lTk = 0, tick()
D9.Core.RS.RenderStepped:Connect(function()
    fCnt = fCnt + 1; if tick() - lTk >= 0.5 then local fps = math.floor(fCnt / (tick() - lTk)); pcall(function() D9.UI.Stats.Text = "FPS: " .. fps .. " | PING: " .. string.split(tostring(D9.Core.Stats.Network.ServerStatsItem["Data Ping"]:GetValue()), ".")[1] .. "ms" end); fCnt = 0; lTk = tick() end

    if D9.Config.ESP then
        for _, p in ipairs(D9.Core.Players:GetPlayers()) do
            if p ~= D9.Core.Player and p.Character then
                local hrp = p.Character:FindFirstChild("HumanoidRootPart"); local hum = p.Character:FindFirstChild("Humanoid")
                if hrp and hum then
                    if D9.Config.ESPNames then
                        local tag = D9.UI.ESPFolder:FindFirstChild("T_" .. p.Name)
                        if not tag then tag = Instance.new("BillboardGui", D9.UI.ESPFolder); tag.Name = "T_" .. p.Name; tag.Size = UDim2.new(0, 100, 0, 40); tag.AlwaysOnTop = true; tag.StudsOffset = Vector3.new(0, 3, 0); local tl = Instance.new("TextLabel", tag); tl.Size = UDim2.new(1, 0, 1, 0); tl.BackgroundTransparency = 1; tl.TextStrokeTransparency = 0; tl.Font = Enum.Font.GothamBold; tl.TextSize = 12 end
                        tag.Adornee = hrp; tag.TextLabel.Text = p.Name .. "\n[" .. math.floor(hum.Health) .. " HP]"; tag.TextLabel.TextColor3 = hum.Health > 50 and D9.Theme.AccentGreen or D9.Theme.AccentRed; tag.Enabled = true
                    else local tag = D9.UI.ESPFolder:FindFirstChild("T_" .. p.Name); if tag then tag.Enabled = false end end
                    
                    if D9.Config.ESPBoxes then
                        local h = D9.UI.ESPFolder:FindFirstChild("H_" .. p.Name)
                        if not h then h = Instance.new("Highlight", D9.UI.ESPFolder); h.Name = "H_" .. p.Name; h.FillColor = D9.Theme.AccentRed; h.OutlineColor = D9.Theme.TextWhite; h.FillTransparency = 0.5; h.OutlineTransparency = 0 end
                        h.Adornee = p.Character; h.Enabled = true
                    else local h = D9.UI.ESPFolder:FindFirstChild("H_" .. p.Name); if h then h.Enabled = false end end
                end
            end
        end
    end

    local bst = IsKD(Enum.KeyCode.LeftAlt) or IsKD(Enum.KeyCode.LeftShift); local spd = bst and (D9.Config.FlySpeed * 2.2) or D9.Config.FlySpeed
    if D9.Config.IsFlying and D9.Cache.FlyObj.Velocity and D9.Cache.FlyObj.Align then
        local m = Vector3.zero; local lk = D9.Core.Camera.CFrame.LookVector; local rt = D9.Core.Camera.CFrame.RightVector
        if IsKD(Enum.KeyCode.W) then m += lk end; if IsKD(Enum.KeyCode.S) then m -= lk end; if IsKD(Enum.KeyCode.D) then m += rt end; if IsKD(Enum.KeyCode.A) then m -= rt end; if IsKD(Enum.KeyCode.Space) then m += Vector3.new(0, 1, 0) end; if IsKD(Enum.KeyCode.LeftControl) then m -= Vector3.new(0, 1, 0) end
        D9.Cache.FlyObj.Align.CFrame = D9.Core.Camera.CFrame
        if m.Magnitude > 0 then
            D9.Cache.FlyObj.Velocity.VectorVelocity = m.Unit * spd
            if bst and D9.Cache.AnimTracks.Boost and not D9.Cache.AnimTracks.Boost.IsPlaying then D9.Cache.AnimTracks.Boost:Play(0.2); if D9.Cache.AnimTracks.Forward then D9.Cache.AnimTracks.Forward:Stop(0.2) end; if D9.Cache.AnimTracks.Hover then D9.Cache.AnimTracks.Hover:Stop(0.2) end
            elseif not bst and D9.Cache.AnimTracks.Forward and not D9.Cache.AnimTracks.Forward.IsPlaying then D9.Cache.AnimTracks.Forward:Play(0.2); if D9.Cache.AnimTracks.Boost then D9.Cache.AnimTracks.Boost:Stop(0.2) end; if D9.Cache.AnimTracks.Hover then D9.Cache.AnimTracks.Hover:Stop(0.2) end end
        else
            D9.Cache.FlyObj.Velocity.VectorVelocity = Vector3.zero
            if D9.Cache.AnimTracks.Boost then D9.Cache.AnimTracks.Boost:Stop(0.2) end; if D9.Cache.AnimTracks.Forward then D9.Cache.AnimTracks.Forward:Stop(0.2) end; if D9.Cache.AnimTracks.Hover and not D9.Cache.AnimTracks.Hover.IsPlaying then D9.Cache.AnimTracks.Hover:Play(0.2) end
        end
    end
    
    if D9.Config.CamMode ~= "None" and D9.Cache.FlyObj.DroneVel and D9.Cache.FlyObj.DroneAlign then
        local m = Vector3.zero; local lk = D9.Core.Camera.CFrame.LookVector; local rt = D9.Core.Camera.CFrame.RightVector
        if IsKD(Enum.KeyCode.W) then m += lk end; if IsKD(Enum.KeyCode.S) then m -= lk end; if IsKD(Enum.KeyCode.D) then m += rt end; if IsKD(Enum.KeyCode.A) then m -= rt end; if IsKD(Enum.KeyCode.Space) then m += Vector3.new(0, 1, 0) end; if IsKD(Enum.KeyCode.LeftControl) then m -= Vector3.new(0, 1, 0) end
        D9.Cache.FlyObj.DroneAlign.CFrame = D9.Core.Camera.CFrame; if m.Magnitude > 0 then D9.Cache.FlyObj.DroneVel.VectorVelocity = m.Unit * spd else D9.Cache.FlyObj.DroneVel.VectorVelocity = Vector3.zero end
    end
    
    if D9.Cache.SpeedObj.HaloWeld and D9.Cache.SpeedObj.HaloWeld.Parent and not D9.Config.IsAwakened then D9.Cache.SpeedObj.HaloWeld.C0 = CFrame.new(0, 1.0 + (math.sin(tick() * 4) * 0.15), 0) * CFrame.Angles(math.rad(90), 0, 0) end
    if D9.Config.EnforceSpeed and D9.Core.Player.Character and not D9.Config.IsAwakened then local hum = D9.Core.Player.Character:FindFirstChild("Humanoid"); if hum then hum.UseJumpPower = true; hum.WalkSpeed = D9.Config.WalkSpeed; hum.JumpPower = D9.Config.JumpPower end end
end)

local function UpdPts(c) D9.Cache.Parts = {}; for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") then table.insert(D9.Cache.Parts, p) end end; c.DescendantAdded:Connect(function(d) if d:IsA("BasePart") then table.insert(D9.Cache.Parts, d) end end) end
if D9.Core.Player.Character then UpdPts(D9.Core.Player.Character) end; D9.Core.Player.CharacterAdded:Connect(UpdPts)
D9.Core.RS.Stepped:Connect(function() if D9.Config.Noclip and D9.Core.Player.Character then for _, p in ipairs(D9.Cache.Parts) do if p.CanCollide then p.CanCollide = false end end end end)

D9.Funcs.ApplyGlobalFont()
print("✅ [Deskret9 Hub] Система успешно загружена.")

Features & Information

🌟 Deskret9 Hub Pro - Feature List 🌟 🤖 AI & Automation Smart AI Assistant: Interactive chatbot that responds to your questions and executes commands. AI Laser Navigator: Advanced pathfinding system that draws a neon laser path and auto-walks you to any player on the server. Smart Obstacle Bypass: The AI automatically prompts you to enable Noclip if a path is physically blocked. 🚀 Player & Movement Advanced Flight System: Smooth flying with adjustable speed. Custom Flight Animations: 8 unique poses (Superhero, Ninja, Sky Sprint, Omni, Meditation, etc.). Aura & Trails: Stunning visual speed/flight trails and neon halos (Cyberpunk, Flame, Void, Toxic, Lightning). Camera Modes: Switch between standard, Drone (Freecam), and Spectator modes while flying. Movement Modifiers: Enforce custom WalkSpeed and JumpPower. Noclip: Walk through solid walls and obstacles effortlessly. 👁️ Visuals & ESP Full ESP Suite: Wallhack with Names, HP, Highlights (Boxes), and Tracers. X-Ray Vision: Makes all map structures semi-transparent to find secrets. 33+ Custom Shaders: Completely change the game's atmosphere (Infrared, Nuclear Bomb, Synthwave, Cyberpunk, Silent Hill, Matrix, Anime, and more). 💻 Built-in Utilities & Scripting Integrated ScriptBlox Search: Search the entire ScriptBlox database from inside the game. Execute or copy scripts in one click. Auto-Game Search: Instantly find scripts for the game you are currently playing. Multi-Tab IDE: A built-in code editor/executor with support for multiple script tabs. FPS Boosters: Instantly disable shadows or activate "Potato Mode" (remove textures/materials) for maximum performance. 🔥 Exclusive Features Ultimate Awakening Ability: A massive visual explosion with custom FOV, screen shakes, aura effects, and sounds. Teleport Hub: Built-in catalog of 80+ most popular Roblox games with instant server teleportation. Premium Customization: Beautiful Sidebar UI, multi-language support (EN/RU), customizable fonts, and background wallpapers. Anti-Cheat Guide: Integrated tips and tricks to avoid getting banned or kicked.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts