Description

This script is made by Nova and includes the auto fire function with kill all and other combat related features in the game. Also its an open source script and can be used with most of the executors.

Features

  • + ESP
  • + head expand
  • + Team check
  • + Auto fire
  • + Combat
  • + Kill all
  • + Compensation length
  • + Visual features

Supported Executors

Xeno Delta Solara

Script

Add Xeno Scripts as a preferred source
-- language: Luau, target: Roblox "Blox Strike", executors: Xeno / Delta / Wave / Solara
-- NOVA SIMPLE v5: Kill All + анти-отдача · превью-каталог (drag-вращение, зум) · вкладка Мир удалена

local ENV = (getgenv and getgenv()) or {}
if ENV.NOVASimple and ENV.NOVASimple.Unload then pcall(ENV.NOVASimple.Unload) end

local Players          = game:GetService("Players")
local RunService       = game:GetService("RunService")
local TweenService     = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local HttpService      = game:GetService("HttpService")
local VirtualUser      = game:GetService("VirtualUser")

local LP = Players.LocalPlayer

--// CONFIG
local CFG = {
    TeamCheck = true, TeamRadius = 30,

    ESP = true, Highlight = true, HeadBox = true,
    Name = true, Health = true, Distance = true, MaxDistance = 2500,
    ESPColor     = Color3.fromRGB(255, 70, 85),
    HeadBoxColor = Color3.fromRGB(255, 215, 60),

    HeadExpand = false, HeadSize = 6, HeadTransparency = 0.55,

    KillAll = false, FireDelay = 0.15,
    NoRecoil = false, RecoilStrength = 100,

    Particles = true,
    GuiKey = Enum.KeyCode.RightShift,
}

--// THEME
local Theme = {
    Accent  = Color3.fromRGB(227, 137, 35),
    Bg      = Color3.fromRGB(13, 13, 19),
    Bg2     = Color3.fromRGB(22, 23, 32),
    Bg3     = Color3.fromRGB(30, 31, 42),
    Stroke  = Color3.fromRGB(46, 46, 64),
    Text    = Color3.fromRGB(236, 236, 246),
    TextDim = Color3.fromRGB(138, 138, 162),
    Green   = Color3.fromRGB(116, 203, 73),
    Red     = Color3.fromRGB(236, 72, 78),
    Ally    = Color3.fromRGB(86, 196, 255),
}
local AccentPresets = {
    { "Оранж",   Color3.fromRGB(227, 137, 35) },
    { "Фиолет",  Color3.fromRGB(124, 92, 255) },
    { "Синий",   Color3.fromRGB(0, 170, 255) },
    { "Зелёный", Color3.fromRGB(0, 215, 135) },
    { "Розовый", Color3.fromRGB(255, 80, 160) },
}

--// STATE
local running = true
local minimized = false
local Conns = {}
local function Bind(signal, fn)
    local c = signal:Connect(fn)
    table.insert(Conns, c)
    return c
end

local function New(class, props, children)
    local inst = Instance.new(class)
    for k, v in pairs(props) do
        if k ~= "Parent" then inst[k] = v end
    end
    if children then
        for _, c in ipairs(children) do c.Parent = inst end
    end
    if props.Parent then inst.Parent = props.Parent end
    return inst
end
local function Corner(r) return New("UICorner", { CornerRadius = UDim.new(0, r) }) end
local function TI(t, style, dir) return TweenInfo.new(t, style or Enum.EasingStyle.Quint, dir or Enum.EasingDirection.Out) end
local function Tag(inst, role) inst:SetAttribute("__accent", role) return inst end

--// I18N
local LANG, bindings = "ru", {}
local TR = {
    ru = {
        subtitle = "KILL ALL • ESP • ГОЛОВА • АНТИ-ОТДАЧА",
        tab_team = "Команды", tab_combat = "Бой", tab_visuals = "Визуалы",
        tab_head = "Голова", tab_config = "Конфиг",
        sec_team = "Команда / Раунд", sec_killall = "Kill All", sec_recoil = "Отдача",
        sec_esp = "ESP", sec_head = "Хитбокс головы",
        sec_gui = "Интерфейс", sec_lang = "Язык", sec_keys = "Клавиши",
        team_check = "Проверка команды", radius = "Радиус спавн-команды",
        rescan = "Пересканировать сейчас", allies = "Союзников",
        scan_done = "Калибровка завершена · союзников: ",
        kill_all = "Kill All (авто-стрельба)", fire_delay = "Интервал выстрела",
        killall_note = "Головы растягиваются автоматически · стрельба по ближайшей видимой голове · не держи меню под курсором",
        killed = "Убито",
        no_recoil = "Убирать отдачу", recoil_strength = "Сила компенсации",
        esp = "ESP", highlight = "Подсветка (сквозь стены)", head_box = "Бокс головы (сквозь стены)",
        name = "Имя", hp = "Полоска HP", distance = "Дистанция", esp_dist = "Дальность ESP",
        esp_color = "Цвет ESP", hb_color = "Цвет бокса головы",
        head_expand = "Увеличение головы", head_size = "Размер головы", transparency = "Прозрачность",
        particles = "Частицы", accent = "Акцент", gui_key = "Клавиша меню",
        unload = "Выгрузить скрипт", delete_note = "Delete — выгрузка всегда",
        preview_esp = "ПРЕДПРОСМОТР · ДЕМО ESP", preview_hint = "Тяни мышью — вращение · колесо — зум",
        hp_stat = "Здоровье", team_stat = "Команда", neutral = "Нейтральный",
        lang_tip = "Переключает язык интерфейса",
        loaded = "NOVA v5 · RShift — меню · Delete — выгрузка",
    },
    en = {
        subtitle = "KILL ALL • ESP • HEAD • ANTI-RECOIL",
        tab_team = "Team", tab_combat = "Combat", tab_visuals = "Visuals",
        tab_head = "Head", tab_config = "Config",
        sec_team = "Team / Round", sec_killall = "Kill All", sec_recoil = "Recoil",
        sec_esp = "ESP", sec_head = "Head hitbox",
        sec_gui = "Interface", sec_lang = "Language", sec_keys = "Keys",
        team_check = "Team check", radius = "Spawn team radius",
        rescan = "Rescan now", allies = "Allies",
        scan_done = "Calibration done · allies: ",
        kill_all = "Kill All (auto-fire)", fire_delay = "Fire interval",
        killall_note = "Heads expand automatically · fires at nearest visible head · keep menu away from cursor",
        killed = "Killed",
        no_recoil = "Remove recoil", recoil_strength = "Compensation strength",
        esp = "ESP", highlight = "Highlight (through walls)", head_box = "Head box (through walls)",
        name = "Name", hp = "HP bar", distance = "Distance", esp_dist = "ESP distance",
        esp_color = "ESP color", hb_color = "Head box color",
        head_expand = "Head expand", head_size = "Head size", transparency = "Transparency",
        particles = "Particles", accent = "Accent", gui_key = "Menu key",
        unload = "Unload script", delete_note = "Delete — unload always",
        preview_esp = "PREVIEW · ESP DEMO", preview_hint = "Drag to rotate · wheel to zoom",
        hp_stat = "Health", team_stat = "Team", neutral = "Neutral",
        lang_tip = "Changes interface language only",
        loaded = "NOVA v5 · RShift — menu · Delete — unload",
    },
}
local function tr(k) local t = TR[LANG] return (t and t[k]) or k end
local function bind(fn) bindings[#bindings + 1] = fn fn() end
local function setLang(l)
    if l ~= "ru" and l ~= "en" then return end
    LANG = l
    for _, f in ipairs(bindings) do pcall(f) end
end

local Notify, RefreshAccent, SelectTab
local CurrentTab = 1
local AlliesLabel, KillLabel

--// ROOT GUI
local ScreenGui = New("ScreenGui", {
    Name = "NOVA_" .. HttpService:GenerateGUID(false):sub(1, 8),
    ResetOnSpawn = false, IgnoreGuiInset = true,
    ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 999999,
})
do
    local mounted = false
    if gethui then
        local ok, parent = pcall(gethui)
        if ok and parent then
            local ok2 = pcall(function() ScreenGui.Parent = parent end)
            mounted = ok2 and ScreenGui.Parent == parent
        end
    end
    if not mounted then
        local ok = pcall(function() ScreenGui.Parent = game:GetService("CoreGui") end)
        if not ok or not ScreenGui.Parent then ScreenGui.Parent = LP:WaitForChild("PlayerGui") end
    end
end

local Scale = New("UIScale", { Scale = 0.9 })

local Main = New("Frame", {
    AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5),
    Size = UDim2.fromOffset(620, 440), BackgroundColor3 = Theme.Bg,
    BorderSizePixel = 0, ClipsDescendants = true, Active = true, Parent = ScreenGui,
}, { Scale, Corner(12) })
New("UIStroke", { Color = Theme.Stroke, Thickness = 1, Transparency = 0.15, Parent = Main })

New("Frame", {
    Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(255, 255, 255), Parent = Main,
}, {
    New("UIGradient", {
        Rotation = 16,
        Color = ColorSequence.new(Color3.fromRGB(255, 255, 255), Color3.fromRGB(190, 190, 220)),
        Transparency = NumberSequence.new({
            NumberSequenceKeypoint.new(0, 0.97),
            NumberSequenceKeypoint.new(1, 0.93),
        }),
    }),
})

--// PARTICLES
local ParticleLayer = New("Frame", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Parent = Main })
local Particles = {}
for i = 1, 20 do
    local size = math.random(1, 3)
    local obj = New("Frame", {
        Size = UDim2.fromOffset(size, size), Position = UDim2.fromScale(math.random(), math.random()),
        BackgroundColor3 = i % 2 == 0 and Theme.Accent or Color3.fromRGB(120, 89, 58),
        BackgroundTransparency = 0.78, BorderSizePixel = 0, Parent = ParticleLayer,
    }, { Corner(size) })
    local a = math.random() * math.pi * 2
    Particles[#Particles + 1] = { Obj = obj, X = math.cos(a), Y = math.sin(a) }
end
Bind(RunService.RenderStepped, function(dt)
    ParticleLayer.Visible = running and CFG.Particles and Main.Visible and not minimized
    if not ParticleLayer.Visible then return end
    for _, p in ipairs(Particles) do
        local old = p.Obj.Position
        local x = old.X.Scale + p.X * dt * 4.2
        local y = old.Y.Scale + p.Y * dt * 4.2
        if x < 0 then x = 1 elseif x > 1 then x = 0 end
        if y < 0 then y = 1 elseif y > 1 then y = 0 end
        p.Obj.Position = UDim2.fromScale(x, y)
    end
end)

--// TOPBAR
local Topbar = New("Frame", { Size = UDim2.new(1, 0, 0, 44), BackgroundTransparency = 1, Active = true, Parent = Main })

local Dot = Tag(New("Frame", {
    Position = UDim2.fromOffset(16, 15), Size = UDim2.fromOffset(14, 14),
    BackgroundColor3 = Theme.Accent, Parent = Topbar,
}, { Corner(7) }), "bg")
New("Frame", {
    Position = UDim2.fromOffset(3, 3), Size = UDim2.fromOffset(8, 8),
    BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.55, Parent = Dot,
}, { Corner(4) })

New("TextLabel", {
    Position = UDim2.fromOffset(40, 0), Size = UDim2.fromOffset(90, 44), BackgroundTransparency = 1,
    Text = "NOVA", TextColor3 = Theme.Text, TextSize = 16,
    Font = Enum.Font.GothamBlack, TextXAlignment = Enum.TextXAlignment.Left, Parent = Topbar,
})
New("TextLabel", {
    Position = UDim2.fromOffset(96, 0), Size = UDim2.fromOffset(220, 44), BackgroundTransparency = 1,
    Text = "· simple rebuild", TextColor3 = Theme.TextDim, TextSize = 13,
    Font = Enum.Font.GothamMedium, TextXAlignment = Enum.TextXAlignment.Left, Parent = Topbar,
})

local KeyHint = New("TextLabel", {
    AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -104, 0.5, 0), Size = UDim2.fromOffset(84, 24),
    BackgroundColor3 = Theme.Bg2, BackgroundTransparency = 0.4, Text = CFG.GuiKey.Name,
    TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.GothamBold, Parent = Topbar,
}, { Corner(6) })

local MinBtn = New("TextButton", {
    AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -68, 0.5, 0), Size = UDim2.fromOffset(26, 26),
    BackgroundColor3 = Theme.Bg2, BackgroundTransparency = 0.4, Text = "—",
    TextColor3 = Theme.TextDim, TextSize = 14, Font = Enum.Font.GothamBold, AutoButtonColor = false, Parent = Topbar,
}, { Corner(13) })

local CloseBtn = New("TextButton", {
    AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -36, 0.5, 0), Size = UDim2.fromOffset(26, 26),
    BackgroundColor3 = Theme.Bg2, BackgroundTransparency = 0.4, Text = "×",
    TextColor3 = Theme.TextDim, TextSize = 15, Font = Enum.Font.GothamBold, AutoButtonColor = false, Parent = Topbar,
}, { Corner(13) })

--// BODY
local Body = New("Frame", {
    Position = UDim2.fromOffset(0, 44), Size = UDim2.new(1, 0, 1, -44),
    BackgroundTransparency = 1, Parent = Main,
})

local Sidebar = New("Frame", {
    Size = UDim2.new(0, 152, 1, 0), BackgroundTransparency = 1, Parent = Body,
}, {
    New("UIListLayout", { Padding = UDim.new(0, 4), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }),
    New("UIPadding", { PaddingTop = UDim.new(0, 10) }),
})
New("Frame", { Position = UDim2.fromOffset(152, 0), Size = UDim2.new(0, 1, 1, 0), BackgroundColor3 = Theme.Bg3, BackgroundTransparency = 0.5, Parent = Body })
local Content = New("Frame", { Position = UDim2.fromOffset(153, 0), Size = UDim2.new(1, -153, 1, 0), BackgroundTransparency = 1, Parent = Body })

--// PAGES + NAV — вкладка Мир удалена, добавлена Бой
local Pages, TabBtns = {}, {}
local NavInfo = {
    { id = "team",    key = "tab_team",    glyph = "◈" },
    { id = "combat",  key = "tab_combat",  glyph = "✦" },
    { id = "visuals", key = "tab_visuals", glyph = "◉" },
    { id = "head",    key = "tab_head",    glyph = "◎" },
    { id = "config",  key = "tab_config",  glyph = "⚙" },
}

local function MakePage(id)
    local page = New("ScrollingFrame", {
        Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false,
        ScrollBarThickness = 3, ScrollBarImageColor3 = Theme.Stroke,
        CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y, Parent = Content,
    }, {
        New("UIListLayout", { Padding = UDim.new(0, 10), SortOrder = Enum.SortOrder.LayoutOrder }),
        New("UIPadding", { PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 14), PaddingTop = UDim.new(0, 12), PaddingBottom = UDim.new(0, 14) }),
    })
    Pages[id] = page
    return page
end
for _, n in ipairs(NavInfo) do MakePage(n.id) end

local function MakeTab(info, order)
    local btn = New("TextButton", {
        Size = UDim2.new(1, -16, 0, 38), BackgroundColor3 = Theme.Bg2, BackgroundTransparency = 1,
        Text = "", AutoButtonColor = false, LayoutOrder = order, Parent = Sidebar,
    }, { Corner(9) })
    local ind = Tag(New("Frame", {
        Size = UDim2.new(0, 3, 0, 16), Position = UDim2.new(0, 0, 0.5, 0),
        BackgroundColor3 = Theme.Accent, BackgroundTransparency = 1, Parent = btn,
    }, { Corner(2) }), "bg")
    New("TextLabel", {
        Position = UDim2.fromOffset(15, 0), Size = UDim2.fromOffset(22, 38), BackgroundTransparency = 1,
        Text = info.glyph, TextColor3 = Theme.TextDim, TextSize = 15, Font = Enum.Font.GothamBold, Parent = btn,
    })
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(43, 0), Size = UDim2.new(1, -50, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = btn,
    })
    bind(function() lbl.Text = tr(info.key) end)
    btn.MouseEnter:Connect(function() if CurrentTab ~= order then TweenService:Create(btn, TI(0.15), { BackgroundTransparency = 0.6 }):Play() end end)
    btn.MouseLeave:Connect(function() if CurrentTab ~= order then TweenService:Create(btn, TI(0.15), { BackgroundTransparency = 1 }):Play() end end)
    btn.MouseButton1Click:Connect(function() SelectTab(order) end)
    TabBtns[order] = { Btn = btn, Ind = ind, Lbl = lbl }
end
for i, n in ipairs(NavInfo) do MakeTab(n, i) end

function SelectTab(i)
    CurrentTab = i
    for j = 1, #NavInfo do
        local active = (j == i)
        Pages[NavInfo[j].id].Visible = active
        local t = TabBtns[j]
        TweenService:Create(t.Ind, TI(0.25), { BackgroundTransparency = active and 0 or 1 }):Play()
        TweenService:Create(t.Lbl, TI(0.25), { TextColor3 = active and Theme.Accent or Theme.TextDim }):Play()
        TweenService:Create(t.Btn, TI(0.25), { BackgroundTransparency = active and 0.6 or 1 }):Play()
    end
end

--// COMPONENTS
local function Row(parent, height)
    local row = New("TextButton", {
        Size = UDim2.new(1, 0, 0, height or 36), BackgroundColor3 = Theme.Bg2,
        BackgroundTransparency = 0.35, Text = "", AutoButtonColor = false, Parent = parent,
    }, { Corner(8) })
    row.MouseEnter:Connect(function() TweenService:Create(row, TI(0.13), { BackgroundTransparency = 0.08 }):Play() end)
    row.MouseLeave:Connect(function() TweenService:Create(row, TI(0.18), { BackgroundTransparency = 0.35 }):Play() end)
    return row
end

local function Section(page, titleKey)
    local holder = New("Frame", { Size = UDim2.new(1, 0, 0, 26), BackgroundTransparency = 1, Parent = page })
    Tag(New("Frame", {
        Position = UDim2.fromOffset(0, 13), Size = UDim2.fromOffset(3, 12),
        BackgroundColor3 = Theme.Accent, BackgroundTransparency = 0.35, Parent = holder,
    }, { Corner(2) }), "bg")
    local l = New("TextLabel", {
        Position = UDim2.fromOffset(11, 0), Size = UDim2.new(1, -11, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.GothamBold,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = holder,
    })
    bind(function() l.Text = tr(titleKey):upper() end)
end

local function Label(page, textKey)
    local l = New("TextLabel", {
        Size = UDim2.new(1, 0, 0, 20), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.Gotham,
        TextXAlignment = Enum.TextXAlignment.Left, TextTransparency = 0.15, TextWrapped = true, Parent = page,
    })
    bind(function() l.Text = tr(textKey) end)
    return l
end

local function Toggle(page, nameKey, key, callback)
    local row = Row(page)
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -80, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() lbl.Text = tr(nameKey) end)
    local sw = New("Frame", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(36, 19),
        BackgroundColor3 = Theme.Bg3, Parent = row,
    }, { Corner(10), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
    local knob = New("Frame", {
        AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 2.5, 0.5, 0), Size = UDim2.fromOffset(14, 14),
        BackgroundColor3 = Theme.TextDim, ZIndex = 2, Parent = sw,
    }, { Corner(7) })
    local function render(instant)
        local state = CFG[key] == true
        local t = TweenInfo.new(instant and 0 or 0.28, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
        TweenService:Create(sw, t, { BackgroundColor3 = state and Theme.Accent or Theme.Bg3 }):Play()
        TweenService:Create(knob, t, {
            Position = state and UDim2.new(1, -16.5, 0.5, 0) or UDim2.new(0, 2.5, 0.5, 0),
            BackgroundColor3 = state and Color3.fromRGB(255, 255, 255) or Theme.TextDim,
        }):Play()
    end
    row.MouseButton1Click:Connect(function()
        CFG[key] = not CFG[key]
        render()
        if callback then callback(CFG[key]) end
    end)
    render(true)
end

local function Slider(page, nameKey, key, mn, mx, step, callback)
    local row = Row(page, 48)
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -90, 0, 26), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() lbl.Text = tr(nameKey) end)
    local val = Tag(New("TextLabel", {
        AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 0), Size = UDim2.fromOffset(80, 26),
        BackgroundTransparency = 1, TextColor3 = Theme.Accent, TextSize = 12, Font = Enum.Font.GothamBold,
        TextXAlignment = Enum.TextXAlignment.Right, Parent = row,
    }), "text")
    local track = New("Frame", {
        AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 12, 1, -10), Size = UDim2.new(1, -24, 0, 4),
        BackgroundColor3 = Theme.Bg3, Parent = row,
    }, { Corner(2) })
    local fill = Tag(New("Frame", { BackgroundColor3 = Theme.Accent, Parent = track }, { Corner(2) }), "bg")
    local knob = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(11, 11),
        BackgroundColor3 = Color3.fromRGB(255, 255, 255), ZIndex = 2, Parent = track,
    }, { Corner(5), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
    local dragging = false
    local function set(v)
        v = math.clamp(v, mn, mx)
        v = math.floor(v / step + 0.5) * step
        v = tonumber(string.format("%.3f", v)) or mn
        CFG[key] = v
        local rel = (v - mn) / (mx - mn)
        fill.Size = UDim2.new(rel, 0, 1, 0)
        knob.Position = UDim2.new(rel, 0, 0.5, 0)
        val.Text = step < 1 and string.format("%.2f", v) or tostring(math.floor(v))
        if callback then callback(v) end
    end
    local function fromX(px)
        if track.AbsoluteSize.X <= 0 then return end
        local rel = math.clamp((px - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
        set(mn + (mx - mn) * rel)
    end
    track.InputBegan:Connect(function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            fromX(inp.Position.X)
        end
    end)
    Bind(UserInputService.InputEnded, function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragging = false
        end
    end)
    Bind(UserInputService.InputChanged, function(inp)
        if dragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then
            fromX(inp.Position.X)
        end
    end)
    set(CFG[key])
end

--// COLOR PICKER
local function ColorPicker(page, nameKey, key, callback)
    local container = New("Frame", {
        Size = UDim2.new(1, 0, 0, 36), BackgroundTransparency = 1,
        ClipsDescendants = true, Parent = page,
    })
    local header = Row(container)
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -110, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = header,
    })
    bind(function() lbl.Text = tr(nameKey) end)
    local chip = New("Frame", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -32, 0.5, 0), Size = UDim2.fromOffset(22, 22),
        BackgroundColor3 = CFG[key], Parent = header,
    }, { Corner(6), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
    local chev = New("TextLabel", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(16, 16),
        BackgroundTransparency = 1, Text = "▾", TextColor3 = Theme.TextDim, TextSize = 12,
        Font = Enum.Font.GothamBold, Parent = header,
    })

    local body = New("Frame", {
        Position = UDim2.fromOffset(0, 40), Size = UDim2.new(1, 0, 0, 178),
        BackgroundTransparency = 1, Parent = container,
    })

    local sv = New("Frame", {
        Size = UDim2.new(1, 0, 0, 146), BackgroundColor3 = Color3.fromHSV(0, 1, 1), Parent = body,
    }, { Corner(8), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
    New("Frame", {
        Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(1, 1, 1), Parent = sv,
    }, {
        Corner(8),
        New("UIGradient", {
            Rotation = 0,
            Transparency = NumberSequence.new({
                NumberSequenceKeypoint.new(0, 0),
                NumberSequenceKeypoint.new(1, 1),
            }),
        }),
    })
    New("Frame", {
        Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.new(0, 0, 0), ZIndex = 2, Parent = sv,
    }, {
        Corner(8),
        New("UIGradient", {
            Rotation = 90,
            Transparency = NumberSequence.new({
                NumberSequenceKeypoint.new(0, 1),
                NumberSequenceKeypoint.new(1, 0),
            }),
        }),
    })
    local svKnob = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(12, 12),
        BackgroundColor3 = Color3.new(1, 1, 1), ZIndex = 3, Parent = sv,
    }, { Corner(6), New("UIStroke", { Color = Color3.new(0, 0, 0), Thickness = 1.5, Transparency = 0.3 }) })

    local hue = New("Frame", {
        AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0), Size = UDim2.new(1, 0, 0, 18),
        Parent = body,
    }, { Corner(6), New("UIGradient", {
        Rotation = 0,
        Color = ColorSequence.new({
            ColorSequenceKeypoint.new(0,    Color3.fromRGB(255, 0, 0)),
            ColorSequenceKeypoint.new(0.17, Color3.fromRGB(255, 255, 0)),
            ColorSequenceKeypoint.new(0.33, Color3.fromRGB(0, 255, 0)),
            ColorSequenceKeypoint.new(0.5,  Color3.fromRGB(0, 255, 255)),
            ColorSequenceKeypoint.new(0.67, Color3.fromRGB(0, 0, 255)),
            ColorSequenceKeypoint.new(0.83, Color3.fromRGB(255, 0, 255)),
            ColorSequenceKeypoint.new(1,    Color3.fromRGB(255, 0, 0)),
        }),
    }) })
    local hueKnob = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.fromOffset(5, 24),
        BackgroundColor3 = Color3.new(1, 1, 1), ZIndex = 2, Parent = hue,
    }, { Corner(2), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })

    local h, s, v = CFG[key]:ToHSV()
    local function apply()
        CFG[key] = Color3.fromHSV(h, s, v)
        chip.BackgroundColor3 = CFG[key]
        sv.BackgroundColor3 = Color3.fromHSV(h, 1, 1)
        svKnob.Position = UDim2.new(s, 0, 1 - v, 0)
        hueKnob.Position = UDim2.new(h, 0, 0.5, 0)
        if callback then callback(CFG[key]) end
    end

    local dragSV, dragH = false, false
    local function updSV(pos)
        if sv.AbsoluteSize.X <= 0 or sv.AbsoluteSize.Y <= 0 then return end
        s = math.clamp((pos.X - sv.AbsolutePosition.X) / sv.AbsoluteSize.X, 0, 1)
        v = 1 - math.clamp((pos.Y - sv.AbsolutePosition.Y) / sv.AbsoluteSize.Y, 0, 1)
        apply()
    end
    local function updH(pos)
        if hue.AbsoluteSize.X <= 0 then return end
        h = math.clamp((pos.X - hue.AbsolutePosition.X) / hue.AbsoluteSize.X, 0, 1)
        apply()
    end
    sv.InputBegan:Connect(function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragSV = true updSV(inp.Position)
        end
    end)
    hue.InputBegan:Connect(function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragH = true updH(inp.Position)
        end
    end)
    Bind(UserInputService.InputEnded, function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragSV, dragH = false, false
        end
    end)
    Bind(UserInputService.InputChanged, function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch then
            if dragSV then updSV(inp.Position) elseif dragH then updH(inp.Position) end
        end
    end)

    local open = false
    header.MouseButton1Click:Connect(function()
        open = not open
        TweenService:Create(container, TI(0.3), { Size = UDim2.new(1, 0, 0, open and 222 or 36) }):Play()
        TweenService:Create(chev, TI(0.3), { Rotation = open and 180 or 0 }):Play()
    end)
    apply()
end

local function Button(page, nameKey, callback)
    local row = Row(page)
    local lbl = New("TextLabel", {
        Size = UDim2.new(1, -24, 1, 0), Position = UDim2.fromOffset(12, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() lbl.Text = tr(nameKey) end)
    row.MouseButton1Click:Connect(function()
        TweenService:Create(row, TI(0.08, Enum.EasingStyle.Quad), { BackgroundTransparency = 0 }):Play()
        task.delay(0.09, function() TweenService:Create(row, TI(0.2), { BackgroundTransparency = 0.35 }):Play() end)
        callback()
    end)
end

local function Keybind(page, nameKey, callback)
    local row = Row(page)
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -100, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() lbl.Text = tr(nameKey) end)
    local kbtn = New("TextButton", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(70, 24),
        BackgroundColor3 = Theme.Bg3, Text = CFG.GuiKey.Name, TextColor3 = Theme.TextDim, TextSize = 11,
        Font = Enum.Font.GothamBold, AutoButtonColor = false, Parent = row,
    }, { Corner(6), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
    local listening = false
    kbtn.MouseButton1Click:Connect(function()
        if listening then return end
        listening = true
        kbtn.Text = "…"
        local conn
        conn = UserInputService.InputBegan:Connect(function(inp, gpe)
            if gpe then return end
            conn:Disconnect()
            listening = false
            if inp.UserInputType == Enum.UserInputType.Keyboard and inp.KeyCode ~= Enum.KeyCode.Backspace then
                kbtn.Text = inp.KeyCode.Name
                callback(inp.KeyCode)
            else
                kbtn.Text = CFG.GuiKey.Name
            end
        end)
    end)
end

local function AccentRow(page)
    local row = Row(page, 44)
    local lbl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(0, 200, 0, 24), BackgroundTransparency = 1,
        TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() lbl.Text = tr("accent") end)
    local holder = New("Frame", {
        AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -12, 0, 8), Size = UDim2.fromOffset(140, 20),
        BackgroundTransparency = 1, Parent = row,
    }, { New("UIListLayout", { Padding = UDim.new(0, 6), FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right }) })
    for _, p in ipairs(AccentPresets) do
        local b = New("TextButton", {
            Size = UDim2.fromOffset(18, 18), BackgroundColor3 = p[2], Text = "", AutoButtonColor = false, Parent = holder,
        }, { Corner(9), New("UIStroke", { Color = Theme.Stroke, Thickness = 1 }) })
        b.MouseButton1Click:Connect(function()
            Theme.Accent = p[2]
            RefreshAccent()
        end)
    end
end

--// NOTIFICATIONS
local NotifHolder = New("Frame", {
    AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -14, 0, 54), Size = UDim2.fromOffset(300, 800),
    BackgroundTransparency = 1, Parent = ScreenGui,
}, { New("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }) })

local NotifOrder = 0
function Notify(title, text, dur)
    dur = dur or 3
    NotifOrder += 1
    local card = New("CanvasGroup", {
        Size = UDim2.new(1, 0, 0, 62), BackgroundColor3 = Theme.Bg2,
        GroupTransparency = 1, LayoutOrder = NotifOrder, Parent = NotifHolder,
    }, { Corner(10), New("UIStroke", { Color = Theme.Stroke, Thickness = 1, Transparency = 0.2 }) })
    Tag(New("Frame", {
        Size = UDim2.new(0, 3, 1, -20), Position = UDim2.fromOffset(10, 10),
        BackgroundColor3 = Theme.Accent, Parent = card,
    }, { Corner(2) }), "bg")
    New("TextLabel", {
        Position = UDim2.fromOffset(24, 9), Size = UDim2.new(1, -34, 0, 16), BackgroundTransparency = 1,
        Text = title, TextColor3 = Theme.Text, TextSize = 13, Font = Enum.Font.GothamBold,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = card,
    })
    New("TextLabel", {
        Position = UDim2.fromOffset(24, 28), Size = UDim2.new(1, -34, 0, 28), BackgroundTransparency = 1,
        Text = text, TextColor3 = Theme.TextDim, TextSize = 12, Font = Enum.Font.Gotham,
        TextXAlignment = Enum.TextXAlignment.Left, TextWrapped = true, Parent = card,
    })
    local prog = Tag(New("Frame", {
        AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0), Size = UDim2.new(1, 0, 0, 2),
        BackgroundColor3 = Theme.Accent, Parent = card,
    }, { Corner(1) }), "bg")
    local sc = New("UIScale", { Scale = 0.9, Parent = card })
    TweenService:Create(card, TI(0.3), { GroupTransparency = 0 }):Play()
    TweenService:Create(sc, TI(0.35, Enum.EasingStyle.Back), { Scale = 1 }):Play()
    TweenService:Create(prog, TweenInfo.new(dur, Enum.EasingStyle.Linear), { Size = UDim2.new(0, 0, 0, 2) }):Play()
    task.delay(dur, function()
        TweenService:Create(card, TI(0.3), { GroupTransparency = 1 }):Play()
        task.delay(0.32, function() card:Destroy() end)
    end)
end

function RefreshAccent()
    for _, d in ipairs(ScreenGui:GetDescendants()) do
        local role = d:GetAttribute("__accent")
        if role == "bg" then d.BackgroundColor3 = Theme.Accent
        elseif role == "stroke" then d.Color = Theme.Accent
        elseif role == "text" then d.TextColor3 = Theme.Accent
        end
    end
end

--// WATERMARK + FPS
local fpsValue = 0
local fpsFrames, fpsLast = 0, os.clock()
Bind(RunService.RenderStepped, function()
    fpsFrames += 1
    if os.clock() - fpsLast >= 0.5 then
        fpsValue = fpsFrames / (os.clock() - fpsLast)
        fpsFrames, fpsLast = 0, os.clock()
    end
end)
local Wm = New("TextLabel", {
    Position = UDim2.fromOffset(12, 8), Size = UDim2.fromOffset(320, 20), BackgroundTransparency = 1,
    TextColor3 = Theme.TextDim, TextTransparency = 0.25, TextSize = 12,
    Font = Enum.Font.GothamMedium, TextXAlignment = Enum.TextXAlignment.Left, Parent = ScreenGui,
})
Bind(RunService.RenderStepped, function()
    Wm.Text = "NOVA · " .. math.floor(fpsValue + 0.5) .. " fps"
end)

--============================================================
-- FEATURES
--============================================================

local function getRoot(player)
    local c = player and player.Character
    if not c then return nil end
    return c:FindFirstChild("HumanoidRootPart") or c:FindFirstChild("UpperTorso") or c:FindFirstChild("Torso")
end

local function getHP(player)
    local c = player and player.Character
    if not c then return 0 end
    local hum = c:FindFirstChildOfClass("Humanoid")
    if hum then return hum.Health end
    local hp = c:GetAttribute("Health") or c:GetAttribute("HP")
    if typeof(hp) == "number" then return hp end
    return getRoot(player) and 100 or 0
end

local function alive(player) return getHP(player) > 0 end

--// TEAM
local roundTeam, mySpawnPoint, scanning = {}, nil, false

local ATTRIBUTE_KEYS = { "Team", "TeamId", "TeamID", "Side", "Faction" }
local function standardTeammate(a, b)
    if not a or not b then return false end
    if a.Team and b.Team then return a.Team == b.Team end
    if not a.Neutral and not b.Neutral and a.TeamColor and b.TeamColor then
        return a.TeamColor == b.TeamColor
    end
    for _, key in ipairs(ATTRIBUTE_KEYS) do
        local x, y = a:GetAttribute(key), b:GetAttribute(key)
        if x ~= nil and y ~= nil then return tostring(x) == tostring(y) end
    end
    return false
end

local function teammate(plr)
    if plr == LP then return true end
    if standardTeammate(LP, plr) then return true end
    return roundTeam[plr] == true
end

local function validTarget(plr)
    if plr == LP or not alive(plr) then return false end
    if CFG.TeamCheck and teammate(plr) then return false end
    return true
end

local function refreshCounter()
    if AlliesLabel then
        local n = 0
        for _ in pairs(roundTeam) do n += 1 end
        AlliesLabel.Text = tr("allies") .. ": " .. n .. (scanning and "  ·  …" or "")
    end
end

local function startScan(seconds)
    if scanning then return end
    scanning = true
    task.spawn(function()
        table.clear(roundTeam)
        local root = getRoot(LP)
        if root then mySpawnPoint = root.Position end
        local t0 = os.clock()
        while os.clock() - t0 < seconds do
            local mr = getRoot(LP)
            if mr then
                for _, plr in ipairs(Players:GetPlayers()) do
                    if plr ~= LP and not roundTeam[plr] and alive(plr) then
                        local r = getRoot(plr)
                        if r and (r.Position - mr.Position).Magnitude <= CFG.TeamRadius then
                            roundTeam[plr] = true
                        end
                    end
                end
            end
            task.wait(0.25)
        end
        scanning = false
        local n = 0
        for _ in pairs(roundTeam) do n += 1 end
        Notify(tr("sec_team"), tr("scan_done") .. n, 3)
        refreshCounter()
    end)
end

--// ESP
local ESP = {}
local ESPremove

local HLFolder = New("Folder", { Name = "NOVA_HL_" .. math.random(1000, 9999), Parent = workspace })

ESPremove = function(plr)
    local d = ESP[plr]
    if not d then return end
    pcall(function() d.Highlight:Destroy() end)
    pcall(function() d.HeadHL:Destroy() end)
    pcall(function() d.Box:Destroy() end)
    pcall(function() d.Gui:Destroy() end)
    ESP[plr] = nil
end

local function ensureESP(plr)
    if plr == LP then return end
    local char = plr.Character
    if not char then return end
    local ex = ESP[plr]
    if ex and ex.Char == char then return end
    if ex then ESPremove(plr) end
    local head = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
    if not head then return end

    local hl = New("Highlight", {
        Adornee = char, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,
        FillTransparency = 0.75, OutlineTransparency = 0.1, Enabled = false, Parent = char,
    })
    local headHL = New("Highlight", {
        Adornee = head, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,
        FillTransparency = 0.85, OutlineTransparency = 0.05, Enabled = false, Parent = HLFolder,
    })
    local box = New("BoxHandleAdornment", {
        Adornee = head, AlwaysOnTop = true, ZIndex = 10, Size = head.Size,
        Transparency = 0.6, Visible = false, Parent = HLFolder,
    })
    local bill = New("BillboardGui", {
        Adornee = head, Size = UDim2.fromOffset(200, 40),
        StudsOffset = Vector3.new(0, 2.4, 0), AlwaysOnTop = true, Enabled = false, Parent = HLFolder,
    })
    local nameL = New("TextLabel", {
        Size = UDim2.new(1, 0, 0, 14), BackgroundTransparency = 1,
        Font = Enum.Font.GothamBold, TextSize = 13, TextStrokeTransparency = 0.3, Parent = bill,
    })
    local hpBg = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 17),
        Size = UDim2.new(1, -40, 0, 4), BackgroundColor3 = Color3.fromRGB(10, 10, 14),
        BackgroundTransparency = 0.25, Parent = bill,
    }, { Corner(2) })
    local hp = New("Frame", {
        AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0),
        Size = UDim2.fromScale(1, 1), BackgroundColor3 = Theme.Green, Parent = hpBg,
    }, { Corner(2) })
    local distL = New("TextLabel", {
        Position = UDim2.new(0, 0, 0, 24), Size = UDim2.new(1, 0, 0, 12), BackgroundTransparency = 1,
        Font = Enum.Font.GothamMedium, TextSize = 11, TextColor3 = Theme.TextDim,
        TextStrokeTransparency = 0.3, Parent = bill,
    })
    ESP[plr] = { Char = char, Head = head, Highlight = hl, HeadHL = headHL, Box = box,
                 Gui = bill, NameL = nameL, Hp = hp, HpBg = hpBg, DistL = distL }
end

local function updateESP()
    local cam = workspace.CurrentCamera
    if not cam then return end
    for _, plr in ipairs(Players:GetPlayers()) do ensureESP(plr) end
    for plr, d in pairs(ESP) do
        local char = plr.Character
        if not char then
            ESPremove(plr)
        else
            local root = getRoot(plr)
            local dist = root and (root.Position - cam.CFrame.Position).Magnitude or math.huge
            local show = running and CFG.ESP and alive(plr)
                and (not CFG.TeamCheck or not teammate(plr))
                and dist <= CFG.MaxDistance
            local isAlly = CFG.TeamCheck and teammate(plr)
            local col = isAlly and Theme.Ally or CFG.ESPColor
            local hbCol = CFG.HeadBoxColor

            d.Highlight.Enabled = show and CFG.Highlight
            if show and CFG.Highlight then
                d.Highlight.FillColor = col
                d.Highlight.OutlineColor = col
            end

            d.HeadHL.Enabled = show and CFG.HeadBox and not isAlly
            d.Box.Visible = show and CFG.HeadBox and not isAlly
            if show and CFG.HeadBox and not isAlly then
                d.HeadHL.FillColor = hbCol
                d.HeadHL.OutlineColor = hbCol
                d.Box.Color3 = hbCol
                d.Box.Size = d.Head.Size
            end

            d.Gui.Enabled = show
            if show then
                local hpv = math.clamp(getHP(plr) / 100, 0, 1)
                d.NameL.Visible = CFG.Name
                d.NameL.Text = plr.DisplayName
                d.NameL.TextColor3 = col
                d.HpBg.Visible = CFG.Health
                d.Hp.Visible = CFG.Health
                d.Hp.Size = UDim2.new(hpv, 0, 1, 0)
                d.Hp.BackgroundColor3 = hpv > 0.5 and Theme.Green
                    or hpv > 0.25 and Color3.fromRGB(255, 215, 60)
                    or Theme.Red
                d.DistL.Visible = CFG.Distance
                d.DistL.Text = math.floor(dist) .. (LANG == "ru" and " м" or " m")
            end
        end
    end
end

--// HEAD EXPAND — при активном Kill All расширяет головы валидных целей даже с выключенным тумблером
local originalHeads = {}

local function restoreOneHead(head)
    local o = originalHeads[head]
    if not o then return end
    originalHeads[head] = nil
    if head.Parent then
        pcall(function()
            head.Size = o.Size
            head.Transparency = o.Transparency
            head.CanCollide = o.CanCollide
            head.Massless = o.Massless
        end)
    end
end

local function restoreHeads()
    for head in pairs(originalHeads) do restoreOneHead(head) end
end

--// KILL ALL — состояние
local KillAll = { Active = false, holding = false, lastClick = 0, kills = 0, current = nil, lastHP = 0, aimed = false }

local function refreshKill()
    if KillLabel then
        KillLabel.Text = tr("killed") .. ": " .. KillAll.kills
    end
end

local function headPass()
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= LP then
            local char = plr.Character
            local head = char and char:FindFirstChild("Head")
            if head then
                local want = (CFG.HeadExpand or KillAll.Active) and validTarget(plr)
                if want then
                    if not originalHeads[head] then
                        originalHeads[head] = {
                            Size = head.Size, Transparency = head.Transparency,
                            CanCollide = head.CanCollide, Massless = head.Massless,
                        }
                    end
                    local sz = CFG.HeadSize
                    if KillAll.Active then sz = math.max(sz, 10) end
                    pcall(function()
                        head.Size = Vector3.new(sz, sz, sz)
                        head.Transparency = CFG.HeadTransparency
                        head.CanCollide = false
                        head.Massless = true
                    end)
                else
                    restoreOneHead(head)
                end
            end
        end
    end
end

--// FIRE INPUT — mouse1press при наличии, иначе VirtualUser
local function fireDown()
    if type(mouse1press) == "function" then
        pcall(mouse1press)
    else
        pcall(function()
            VirtualUser:CaptureController()
            VirtualUser:Button1Down(Vector2.new())
        end)
    end
end
local function fireUp()
    if type(mouse1release) == "function" then
        pcall(mouse1release)
    else
        pcall(function()
            VirtualUser:CaptureController()
            VirtualUser:Button1Up(Vector2.new())
        end)
    end
end
local function fireStop()
    if KillAll.holding then
        KillAll.holding = false
        fireUp()
    end
end

local VisParams = RaycastParams.new()
VisParams.FilterType = Enum.RaycastFilterType.Exclude
VisParams.IgnoreWater = true

local function headVisible(head)
    local cam = workspace.CurrentCamera
    if not cam then return false end
    local chars = {}
    for _, p in ipairs(Players:GetPlayers()) do
        if p.Character then table.insert(chars, p.Character) end
    end
    VisParams.FilterDescendantsInstances = chars
    local r = workspace:Raycast(cam.CFrame.Position, head.Position - cam.CFrame.Position, VisParams)
    return r == nil
end

local function collectTargets()
    local cam = workspace.CurrentCamera
    if not cam then return {} end
    local list = {}
    for _, plr in ipairs(Players:GetPlayers()) do
        if validTarget(plr) then
            local char = plr.Character
            local head = char and char:FindFirstChild("Head")
            if head then
                local root = getRoot(plr)
                local d = root and (root.Position - cam.CFrame.Position).Magnitude or math.huge
                table.insert(list, { Plr = plr, Head = head, Dist = d })
            end
        end
    end
    table.sort(list, function(a, b) return a.Dist < b.Dist end)
    return list
end

--// АИМ Kill All — после камеры игры, чтобы её контроллер не перезаписывал прицел
RunService:BindToRenderStep("nova_aim", Enum.RenderPriority.Camera.Value + 1, function()
    KillAll.aimed = false
    if not running or not KillAll.Active then
        fireStop()
        return
    end
    local cam = workspace.CurrentCamera
    if not cam then return end
    local hum = LP.Character and LP.Character:FindFirstChildOfClass("Humanoid")
    if not hum or hum.Health <= 0 then
        fireStop()
        return
    end

    local list = collectTargets()
    local target
    for _, t in ipairs(list) do
        if headVisible(t.Head) then target = t break end
    end
    if not target and list[1] then target = list[1] end

    if not target then
        fireStop()
        KillAll.current = nil
        return
    end

    KillAll.current = target.Plr
    KillAll.aimed = true
    cam.CFrame = CFrame.lookAt(cam.CFrame.Position, target.Head.Position)

    local now = os.clock()
    if now - KillAll.lastClick >= CFG.FireDelay then
        KillAll.lastClick = now
        if KillAll.holding then
            KillAll.holding = false
            fireUp()
        else
            KillAll.holding = true
            fireDown()
        end
    end
end)

--// АНТИ-ОТДАЧА
-- слой 1: компенсация вращения камеры в кадрах БЕЗ движения мыши (отдача = поворот не от игрока)
-- слой 2: зануление NumberValue с recoil/kick в имени внутри PlayerScripts и персонажа
local Recoil = { lastLook = nil, userMoved = false }
Bind(UserInputService.InputChanged, function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        Recoil.userMoved = true
    end
end)

RunService:BindToRenderStep("nova_recoil", Enum.RenderPriority.Camera.Value + 2, function()
    local cam = workspace.CurrentCamera
    if not cam then return end
    local cur = cam.CFrame.LookVector

    if not running or not CFG.NoRecoil or KillAll.aimed then
        Recoil.lastLook = cur
        Recoil.userMoved = false
        return
    end

    local last = Recoil.lastLook
    if not last or Recoil.userMoved then
        Recoil.lastLook = cur
        Recoil.userMoved = false
        return
    end

    local dot = math.clamp(last:Dot(cur), -1, 1)
    local angle = math.acos(dot)
    if angle > 0.0004 and angle < 0.2 then
        local axis = last:Cross(cur)
        if axis.Magnitude > 1e-6 then
            local corr = CFrame.fromAxisAngle(axis.Unit, -angle * (CFG.RecoilStrength / 100))
            cam.CFrame = corr * cam.CFrame
        end
    end
    Recoil.lastLook = cam.CFrame.LookVector
end)

task.spawn(function()
    while running do
        task.wait(0.5)
        if CFG.NoRecoil then
            local roots = {}
            local ps = LP:FindFirstChild("PlayerScripts")
            if ps then table.insert(roots, ps) end
            if LP.Character then table.insert(roots, LP.Character) end
            for _, root in ipairs(roots) do
                for _, inst in ipairs(root:GetDescendants()) do
                    if inst:IsA("NumberValue") or inst:IsA("IntValue") then
                        local n = inst.Name:lower()
                        if n:find("recoil", 1, true) or n:find("kick", 1, true) then
                            if inst.Value ~= 0 then
                                pcall(function() inst.Value = 0 end)
                            end
                        end
                    end
                end
            end
        end
    end
end)

--// TEAM HOOKS
Bind(LP.CharacterAdded, function()
    table.clear(roundTeam)
    refreshCounter()
    fireStop()
    task.delay(0.15, function() if running then startScan(5) end end)
end)

local function hookSpawns(plr)
    if plr == LP then return end
    Bind(plr.CharacterAdded, function(char)
        if scanning or not mySpawnPoint then return end
        local hrp = char:WaitForChild("HumanoidRootPart", 3)
        if hrp and (hrp.Position - mySpawnPoint).Magnitude <= CFG.TeamRadius then
            roundTeam[plr] = true
        end
    end)
end
for _, plr in ipairs(Players:GetPlayers()) do hookSpawns(plr) end
Bind(Players.PlayerAdded, hookSpawns)
Bind(Players.PlayerRemoving, function(plr)
    roundTeam[plr] = nil
    if KillAll.current == plr then KillAll.current = nil end
    ESPremove(plr)
end)

--// PREVIEW STATS
local UpdatePreviewStats

--// UNLOAD
local Unload
Unload = function()
    if not running then return end
    running = false
    fireStop()
    restoreHeads()
    for plr in pairs(ESP) do ESPremove(plr) end
    pcall(function() HLFolder:Destroy() end)
    pcall(function() RunService:UnbindFromRenderStep("nova_aim") end)
    pcall(function() RunService:UnbindFromRenderStep("nova_recoil") end)
    for _, c in ipairs(Conns) do pcall(function() c:Disconnect() end) end
    pcall(function() ScreenGui:Destroy() end)
    if ENV.NOVASimple then ENV.NOVASimple = nil end
end
ENV.NOVASimple = { CFG = CFG, Unload = Unload }

--============================================================
-- PAGE BUILDS
--============================================================

-- Команды
Section(Pages.team, "sec_team")
Toggle(Pages.team, "team_check", "TeamCheck")
Slider(Pages.team, "radius", "TeamRadius", 5, 60, 1)
Button(Pages.team, "rescan", function() startScan(5) end)
do
    local row = Row(Pages.team, 26)
    AlliesLabel = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -24, 1, 0), BackgroundTransparency = 1,
        Text = "", TextColor3 = Theme.TextDim, TextSize = 12, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
end

-- Бой (Kill All + отдача) — вкладка Мир удалена
Section(Pages.combat, "sec_killall")
Toggle(Pages.combat, "kill_all", "KillAll", function(v)
    KillAll.Active = v
    if v then
        KillAll.kills = 0
        refreshKill()
        Notify("Kill All", LANG == "ru" and "Головы растянуты · стрельба началась" or "Heads expanded · firing", 3)
    else
        fireStop()
        KillAll.current = nil
        restoreHeads()
    end
end)
Slider(Pages.combat, "fire_delay", "FireDelay", 0.05, 0.5, 0.05)
Label(Pages.combat, "killall_note")
do
    local row = Row(Pages.combat, 26)
    KillLabel = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -24, 1, 0), BackgroundTransparency = 1,
        Text = "", TextColor3 = Theme.TextDim, TextSize = 12, Font = Enum.Font.GothamMedium,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
end

Section(Pages.combat, "sec_recoil")
Toggle(Pages.combat, "no_recoil", "NoRecoil")
Slider(Pages.combat, "recoil_strength", "RecoilStrength", 0, 100, 5)

-- Визуалы
Section(Pages.visuals, "sec_esp")
Toggle(Pages.visuals, "esp", "ESP")
Toggle(Pages.visuals, "highlight", "Highlight")
Toggle(Pages.visuals, "head_box", "HeadBox")
Toggle(Pages.visuals, "name", "Name")
Toggle(Pages.visuals, "hp", "Health")
Toggle(Pages.visuals, "distance", "Distance")
ColorPicker(Pages.visuals, "esp_color", "ESPColor")
ColorPicker(Pages.visuals, "hb_color", "HeadBoxColor")
Slider(Pages.visuals, "esp_dist", "MaxDistance", 100, 5000, 100)

-- Голова
Section(Pages.head, "sec_head")
Toggle(Pages.head, "head_expand", "HeadExpand", function(v)
    if not v then restoreHeads() end
end)
Slider(Pages.head, "head_size", "HeadSize", 1, 30, 0.5)
Slider(Pages.head, "transparency", "HeadTransparency", 0, 1, 0.05)

-- Конфиг
Section(Pages.config, "sec_gui")
AccentRow(Pages.config)
Toggle(Pages.config, "particles", "Particles")

Section(Pages.config, "sec_lang")
do
    local row = Row(Pages.config, 40)
    local hint = New("TextLabel", {
        Position = UDim2.fromOffset(12, 0), Size = UDim2.new(1, -140, 1, 0), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.Gotham,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = row,
    })
    bind(function() hint.Text = tr("lang_tip") end)
    local ruB = New("TextButton", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -44, 0.5, 0), Size = UDim2.fromOffset(38, 26),
        BackgroundColor3 = Theme.Accent, Text = "RU", TextColor3 = Color3.new(1, 1, 1),
        TextSize = 11, Font = Enum.Font.GothamBold, AutoButtonColor = false, Parent = row,
    }, { Corner(6) })
    local enB = New("TextButton", {
        AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(38, 26),
        BackgroundColor3 = Theme.Bg3, Text = "EN", TextColor3 = Theme.TextDim,
        TextSize = 11, Font = Enum.Font.GothamBold, AutoButtonColor = false, Parent = row,
    }, { Corner(6) })
    bind(function()
        local ru = LANG == "ru"
        ruB.BackgroundColor3 = ru and Theme.Accent or Theme.Bg3
        ruB.TextColor3 = ru and Color3.new(1, 1, 1) or Theme.TextDim
        enB.BackgroundColor3 = ru and Theme.Bg3 or Theme.Accent
        enB.TextColor3 = ru and Theme.TextDim or Color3.new(1, 1, 1)
    end)
    ruB.MouseButton1Click:Connect(function() setLang("ru") end)
    enB.MouseButton1Click:Connect(function() setLang("en") end)
end

Section(Pages.config, "sec_keys")
Keybind(Pages.config, "gui_key", function(kc)
    CFG.GuiKey = kc
    KeyHint.Text = kc.Name
end)
Label(Pages.config, "delete_note")
Button(Pages.config, "unload", function() Unload() end)

--// PREVIEW — КАТАЛОГ: модель статична, вращаешь камеру перетаскиванием, зум колесом
do
    local card = New("Frame", {
        Size = UDim2.new(1, 0, 0, 312), BackgroundColor3 = Theme.Bg2, Parent = Pages.config,
    }, { Corner(10) })
    local ttl = New("TextLabel", {
        Position = UDim2.fromOffset(12, 6), Size = UDim2.new(1, -24, 0, 18), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.GothamBold,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = card,
    })
    bind(function() ttl.Text = tr("preview_esp") end)
    local pname = New("TextLabel", {
        Position = UDim2.fromOffset(12, 24), Size = UDim2.new(1, -24, 0, 18), BackgroundTransparency = 1,
        Text = LP.DisplayName, TextColor3 = Theme.Text, TextSize = 14,
        Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left, Parent = card,
    })
    local vp = New("ViewportFrame", {
        Position = UDim2.fromOffset(10, 46), Size = UDim2.new(1, -20, 0, 200),
        BackgroundColor3 = Theme.Bg, Ambient = Color3.fromRGB(180, 180, 180),
        LightColor = Color3.new(1, 1, 1), LightDirection = Vector3.new(-0.5, -1, -0.6),
        ZIndex = 5, Parent = card,
    }, { Corner(8) })
    local world = New("WorldModel", { Parent = vp })
    local vcam = New("Camera", { Parent = vp })
    vp.CurrentCamera = vcam

    -- слой макета ESP-подписи
    local overlayHolder = New("Frame", {
        Position = UDim2.fromOffset(10, 46), Size = UDim2.new(1, -20, 0, 200),
        BackgroundTransparency = 1, ZIndex = 10, Parent = card,
    })
    local mock = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 1), Size = UDim2.fromOffset(180, 40),
        BackgroundTransparency = 1, Visible = false, ZIndex = 11, Parent = overlayHolder,
    })
    local mockName = New("TextLabel", {
        Size = UDim2.new(1, 0, 0, 14), BackgroundTransparency = 1,
        Font = Enum.Font.GothamBold, TextSize = 13, TextStrokeTransparency = 0.3,
        Text = LP.DisplayName, Parent = mock,
    })
    local mockHpBg = New("Frame", {
        AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 17),
        Size = UDim2.new(1, -40, 0, 4), BackgroundColor3 = Color3.fromRGB(10, 10, 14),
        BackgroundTransparency = 0.25, Parent = mock,
    }, { Corner(2) })
    New("Frame", {
        AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0),
        Size = UDim2.fromScale(1, 1), BackgroundColor3 = Theme.Green, Parent = mockHpBg,
    }, { Corner(2) })
    local mockDist = New("TextLabel", {
        Position = UDim2.new(0, 0, 0, 24), Size = UDim2.new(1, 0, 0, 12), BackgroundTransparency = 1,
        Font = Enum.Font.GothamMedium, TextSize = 11, TextColor3 = Theme.TextDim,
        TextStrokeTransparency = 0.3, Parent = mock,
    })
    bind(function() mockDist.Text = "12 " .. (LANG == "ru" and "м" or "m") end)

    -- слой захвата мыши (над всем)
    local dragLayer = New("TextButton", {
        Position = UDim2.fromOffset(10, 46), Size = UDim2.new(1, -20, 0, 200),
        BackgroundTransparency = 1, Text = "", AutoButtonColor = false, ZIndex = 15, Parent = card,
    })

    local hintL = New("TextLabel", {
        Position = UDim2.fromOffset(14, 248), Size = UDim2.new(1, -28, 0, 14), BackgroundTransparency = 1,
        TextColor3 = Theme.TextDim, TextSize = 10, Font = Enum.Font.Gotham,
        TextXAlignment = Enum.TextXAlignment.Left, Parent = card,
    })
    bind(function() hintL.Text = tr("preview_hint") end)

    local hpV, teamV
    local function stat(lblKey, y)
        local l = New("TextLabel", {
            Position = UDim2.fromOffset(14, y), Size = UDim2.fromOffset(90, 16), BackgroundTransparency = 1,
            TextColor3 = Theme.TextDim, TextSize = 11, Font = Enum.Font.Gotham,
            TextXAlignment = Enum.TextXAlignment.Left, Parent = card,
        })
        bind(function() l.Text = tr(lblKey) end)
        local v = New("TextLabel", {
            Position = UDim2.new(0, 110, 0, y), Size = UDim2.new(1, -124, 0, 16), BackgroundTransparency = 1,
            Text = "-", TextColor3 = Theme.Text, TextSize = 11, Font = Enum.Font.GothamBold,
            TextXAlignment = Enum.TextXAlignment.Right, Parent = card,
        })
        return v
    end
    hpV = stat("hp_stat", 266)
    teamV = stat("team_stat", 286)

    UpdatePreviewStats = function()
        pname.Text = LP.DisplayName
        hpV.Text = tostring(math.floor(getHP(LP)))
        teamV.Text = (LP.Team and LP.Team.Name) or tr("neutral")
    end

    -- орбита камеры — модель НИКОГДА не двигается после центровки (это и была причина разъезда скина)
    local yaw, pitch, zoomF = 0.7, 0.14, 1
    local baseDist, ready = 9, false
    local model, previewHead, prevBodyHL, prevHeadHL

    local function updateCam()
        local d = baseDist * zoomF
        local cp = math.cos(pitch)
        local pos = Vector3.new(math.sin(yaw) * cp, math.sin(pitch), math.cos(yaw) * cp) * d
        vcam.CFrame = CFrame.lookAt(pos, Vector3.new(0, 0, 0))
    end

    local function clean(m)
        for _, obj in ipairs(m:GetDescendants()) do
            if obj:IsA("Script") or obj:IsA("LocalScript") or obj:IsA("ModuleScript") then
                pcall(function() obj:Destroy() end)
            elseif obj:IsA("BasePart") then
                pcall(function()
                    obj.Anchored = true obj.CanCollide = false
                    obj.CanTouch = false obj.CanQuery = false obj.Massless = true
                end)
            elseif obj:IsA("ParticleEmitter") or obj:IsA("Trail") then
                pcall(function() obj.Enabled = false end)
            end
        end
    end

    local function load()
        for _, ch in ipairs(world:GetChildren()) do ch:Destroy() end
        model, previewHead, ready = nil, nil, false
        if prevBodyHL then pcall(function() prevBodyHL:Destroy() end) prevBodyHL = nil end
        if prevHeadHL then pcall(function() prevHeadHL:Destroy() end) prevHeadHL = nil end

        local m
        local ok, desc = pcall(function() return Players:GetHumanoidDescriptionFromUserIdAsync(LP.UserId) end)
        if ok and desc then
            local ok2, created = pcall(function()
                return Players:CreateHumanoidModelFromDescription(desc, Enum.HumanoidRigType.R15)
            end)
            if ok2 then m = created end
        end
        if not m and LP.Character then
            pcall(function() LP.Character.Archivable = true end)
            local ok3, cloned = pcall(function() return LP.Character:Clone() end)
            if ok3 then m = cloned end
        end
        if not m then return end

        clean(m)
        m.Parent = world
        -- центровка ОДИН раз, дальше модель не трогаем
        m:PivotTo(CFrame.new())
        local cf, size = m:GetBoundingBox()
        m:PivotTo(CFrame.new(-cf.Position))

        prevBodyHL = New("Highlight", {
            Adornee = m, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,
            FillTransparency = 0.75, OutlineTransparency = 0.1, Enabled = false, Parent = m,
        })
        local head = m:FindFirstChild("Head")
        if head then
            prevHeadHL = New("Highlight", {
                Adornee = head, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,
                FillTransparency = 0.8, OutlineTransparency = 0.05, Enabled = false, Parent = world,
            })
            previewHead = head
        end

        baseDist = math.max(size.Y * 1.5, 7)
        model = m
        ready = true
        updateCam()
    end

    -- drag-вращение как в каталоге
    local dragging = false
    dragLayer.InputBegan:Connect(function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragging = true
        end
    end)
    Bind(UserInputService.InputEnded, function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragging = false
        end
    end)
    Bind(UserInputService.InputChanged, function(inp)
        if dragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then
            yaw -= inp.Delta.X * 0.01
            pitch = math.clamp(pitch + inp.Delta.Y * 0.006, -0.45, 0.7)
        elseif inp.UserInputType == Enum.UserInputType.MouseWheel then
            -- зум колесом только когда курсор над вьюпортом
            local mp = UserInputService:GetMouseLocation()
            local ap, as = dragLayer.AbsolutePosition, dragLayer.AbsoluteSize
            if mp.X >= ap.X and mp.X <= ap.X + as.X and mp.Y >= ap.Y and mp.Y <= ap.Y + as.Y then
                zoomF = math.clamp(zoomF + (inp.Position.Z > 0 and -0.08 or 0.08), 0.6, 2.2)
            end
        end
    end)

    task.spawn(function() task.wait(0.25) load() end)
    Bind(LP.CharacterAdded, function()
        task.delay(0.8, function() if running then load() end end)
    end)

    Bind(RunService.RenderStepped, function()
        if not (running and ready) then
            mock.Visible = false
            return
        end
        if vp.Visible then updateCam() end

        -- демо ESP: живые цвета и тумблеры
        local show = CFG.ESP
        if prevBodyHL then
            prevBodyHL.Enabled = show and CFG.Highlight
            if show and CFG.Highlight then
                prevBodyHL.FillColor = CFG.ESPColor
                prevBodyHL.OutlineColor = CFG.ESPColor
            end
        end
        if prevHeadHL then
            prevHeadHL.Enabled = show and CFG.HeadBox
            if show and CFG.HeadBox then
                prevHeadHL.FillColor = CFG.HeadBoxColor
                prevHeadHL.OutlineColor = CFG.HeadBoxColor
            end
        end

        mock.Visible = show and previewHead ~= nil and vp.Visible
        if mock.Visible then
            mockName.Visible = CFG.Name
            mockName.TextColor3 = CFG.ESPColor
            mockHpBg.Visible = CFG.Health
            mockDist.Visible = CFG.Distance
            local hw = overlayHolder.AbsoluteSize.X
            local okP, p = pcall(function()
                return vcam:WorldToViewportPoint(previewHead.Position)
            end)
            if okP and typeof(p) == "Vector3" and hw > 0 then
                mock.Position = UDim2.fromOffset(
                    math.clamp(p.X, 92, hw - 92),
                    math.clamp(p.Y - 16, 42, 192))
            else
                mock.Visible = false
            end
        end
    end)
end

--============================================================
-- LOOPS
--============================================================

Bind(RunService.RenderStepped, updateESP)

local slowAcc = 0
Bind(RunService.Heartbeat, function(dt)
    slowAcc += dt
    if slowAcc < 0.3 then return end
    slowAcc = 0
    if not running then return end
    headPass()
    refreshCounter()
    refreshKill()

    -- счётчик убийств: текущая цель умерла под Kill All
    if KillAll.Active and KillAll.current then
        local hp = getHP(KillAll.current)
        if hp <= 0 and KillAll.lastHP > 0 then
            KillAll.kills += 1
            refreshKill()
        end
        KillAll.lastHP = hp
        if hp <= 0 then KillAll.current = nil end
    end

    if UpdatePreviewStats then pcall(UpdatePreviewStats) end
end)

--============================================================
-- WINDOW CONTROL
--============================================================

local FULL = UDim2.fromOffset(620, 440)
local function SetMin(m)
    minimized = m
    Body.Visible = not m
    TweenService:Create(Main, TI(0.3), { Size = m and UDim2.fromOffset(620, 44) or FULL }):Play()
end
MinBtn.MouseButton1Click:Connect(function() SetMin(not minimized) end)

local isOpen = true
local function SetOpen(state)
    isOpen = state
    if state then
        Main.Visible = true
        TweenService:Create(Scale, TI(0.35, Enum.EasingStyle.Back), { Scale = 1 }):Play()
    else
        TweenService:Create(Scale, TI(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.In), { Scale = 0.88 }):Play()
        task.delay(0.26, function() if not isOpen then Main.Visible = false end end)
    end
end
CloseBtn.MouseButton1Click:Connect(function() SetOpen(false) end)

--// HOME — возврат окна, когда кнопки топбара ушли за экран
local HomeBtn = New("CanvasGroup", {
    AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 14, 1, -14),
    Size = UDim2.fromOffset(48, 48), BackgroundColor3 = Theme.Accent,
    GroupTransparency = 1, Visible = false, ZIndex = 500, Parent = ScreenGui,
}, { Corner(15) })
Tag(HomeBtn, "bg")
New("UIStroke", { Color = Theme.Stroke, Thickness = 1, Transparency = 0.4, Parent = HomeBtn })
local homeScale = New("UIScale", { Scale = 1, Parent = HomeBtn })
local homeClick = New("TextButton", {
    Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "⌂",
    TextColor3 = Color3.new(1, 1, 1), TextSize = 24, Font = Enum.Font.GothamBold,
    AutoButtonColor = false, ZIndex = 501, Parent = HomeBtn,
})
homeClick.MouseEnter:Connect(function()
    TweenService:Create(homeScale, TI(0.15), { Scale = 1.12 }):Play()
end)
homeClick.MouseLeave:Connect(function()
    TweenService:Create(homeScale, TI(0.18), { Scale = 1 }):Play()
end)

local homeShown = false
local function SetHome(show)
    if show == homeShown then return end
    homeShown = show
    if show then
        HomeBtn.Visible = true
        TweenService:Create(HomeBtn, TI(0.3, Enum.EasingStyle.Back), { GroupTransparency = 0 }):Play()
    else
        TweenService:Create(HomeBtn, TI(0.2), { GroupTransparency = 1 }):Play()
        task.delay(0.22, function()
            if not homeShown then HomeBtn.Visible = false end
        end)
    end
end

Bind(RunService.Heartbeat, function()
    if not running then return end
    local out = false
    if Main.Visible then
        local cam = workspace.CurrentCamera
        local p, s = MinBtn.AbsolutePosition, MinBtn.AbsoluteSize
        if cam and s.X > 0 then
            local vp = cam.ViewportSize
            out = p.X < 0 or p.Y < 0 or (p.X + s.X) > vp.X or (p.Y + s.Y) > vp.Y
        end
    end
    SetHome(out)
end)

homeClick.MouseButton1Click:Connect(function()
    if not Main.Visible then
        SetOpen(true)
    end
    TweenService:Create(Main, TweenInfo.new(0.55, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
        Position = UDim2.fromScale(0.5, 0.5),
    }):Play()
end)

Bind(UserInputService.InputBegan, function(input, gpe)
    if gpe then return end
    if input.KeyCode == CFG.GuiKey then SetOpen(not isOpen) end
    if input.KeyCode == Enum.KeyCode.Delete then Unload() end
end)

--// DRAG
do
    local dragging, dragStart, startPos = false, nil, nil
    Topbar.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            dragging = true
            dragStart = input.Position
            startPos = Main.Position
            input.Changed:Connect(function()
                if input.UserInputState == Enum.UserInputState.End then dragging = false end
            end)
        end
    end)
    Bind(UserInputService.InputChanged, function(input)
        if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
            local delta = input.Position - dragStart
            Main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
        end
    end)
end

--// INIT
SelectTab(3)
refreshKill()
Notify("NOVA", tr("loaded"), 4)
Script worked? 🚀 Boost it to #1 so others find it too.

Comments (3)

Log in to add a comment.

kolesnicenkoila132940

kolesnicenkoila132940

2 days ago

Чит стал худшим

jamalebk3539

jamalebk3539

2 days ago

не роботает нормально ESP нету онли хиты головы через стены и то с зажержкой хит боксы тоже не роботает(((

jamalebk3539

jamalebk3539

2 days ago

esp не роботает при стрильбе экран трусит ну немножко не то