Rusaken Script (Delta Mobile) – Multihack v9: Inf Stamina, Anti Stun, ESP 35 25 No Key

Rusaken Script (Delta Mobile) – Multihack v9: Inf Stamina, Anti Stun, ESP

Rusaken · Roblox
Play
No key Mobile friendly Working · Nov 4
Report

Description

RUSaken Multihack v9 is a Rusaken script you can run in Delta on Android, iOS or PC. It includes infinite stamina, auto sprint, no slowdown and more. The menu is in Russian (Бесконечная стамина = infinite stamina, Авто-спринт = auto sprint, Анти-стан = anti stun). Created by kotikimiksi. No key.

Key Features

  • Infinite Stamina
  • Auto Sprint
  • Ignore Slowdown
  • Speed lock loop
  • Anti Stun
  • Speed changer
  • Killer and Survivor ESP
  • Item and generator ESP

Rusaken is a survivors-versus-killer game inspired by Forsaken, Die of Death and Bite by Night: survivors repair generators while one player hunts everyone else. kotikimiksi’s RUSaken Multihack v9 is a Rusaken script aimed mainly at survivors who keep running out of stamina or getting stunned, but it has a few tools for killers too.

Translating the menu

All the labels are in Russian. Here’s what each tab means and which options start switched on.

Tab Means Inside
Движение Movement Бесконечная стамина (infinite stamina), Авто-спринт (auto sprint), Игнорировать замедление (ignore slowdown), the speed lock loop, Анти-стан (anti stun), all on from the start; speed 34; infinite jump and fly are off
Бой / TP Fight / teleport Hitbox expansion (off, size 1–69) and teleport buttons: [Z] to the nearest survivor, [X] to the killer
Визуал Visuals Survivor and killer ESP (600 studs by default, adjustable up to 2,000) with lines and HP bars, item and generator highlights, hitbox highlight, full bright
Авто Auto Авто-решение пазла (auto-solves the generator puzzle, with a delay slider and a “solve now” button) and auto-accept for incoming requests
Конфиг Config Save, load and delete named configs

Running v9

Everything is inline in the code box, about 1,300 lines, and it neither asks for a key nor contacts any website. Execute it in Delta (the listing adds Fluxus, Arceus X, Codex and computer injectors). RightShift hides the window. Fly listens for WASD plus Space and Left Ctrl, and the Z and X teleports are keyboard keys too, so on a phone you’ll be using the on-screen buttons. Configs need an executor that can write files. If it can’t, the Config tab reports that the file API isn’t available. “Выгрузить чит” unloads everything.

FAQ

Will it fix generators for me? It solves the puzzle once you’ve opened it, using the game’s own solution, after the delay you choose (0.1 s by default). You still have to walk to the generator.

Is the item list fixed? It looks for medkits, bread, Bloxy Cola, epic sauce and gear by default, and you can add more names in the Visuals tab.

Survivor tip: leave the hitbox highlight on. It colours the game’s hitbox parts cyan and makes them 1.4 times bigger, which gives you a bit more warning to dodge before a hit lands.

Tested With
DeltaCodexArceus XFluxusPC executors
Script CodeRUSaken Multihack v9 (kotikimiksi)
--===========================================================
-- RUSaken Multihack v9
--===========================================================
local Players     = game:GetService("Players")
local UIS         = game:GetService("UserInputService")
local RS          = game:GetService("ReplicatedStorage")
local RunService  = game:GetService("RunService")
local Tween       = game:GetService("TweenService")
local Lighting    = game:GetService("Lighting")
local HttpService = game:GetService("HttpService")
local LP          = Players.LocalPlayer

local Char = LP.Character or LP.CharacterAdded:Wait()
local Hum  = Char:WaitForChild("Humanoid")

local Running = true
local Conns   = {}
local function bind(sig, fn)
    local c = sig:Connect(fn)
    table.insert(Conns, c)
    return c
end

--===========================================================
-- CONFIG
--===========================================================
local Cfg = {
    InfStamina = true, AutoSprint = true, Speed = 34, InfJump = false,
    Noclip = false, Fly = false, FlySpeed = 60, FOV = 90,
    NoSlowdown = true, LoopSpeed = true, AntiStun = true,

    HitboxESP = true, HitboxColor = Color3.fromRGB(0, 220, 255), HitboxScale = 1.4,
    HitboxExpandOn = false, HitboxExpand = 20,
    PlayerESP = true, ESPMaxDist = 600, ESPTracers = true, ESPHealth = true,
    ItemESP = true, GenESP = true,
    SurvivorColor = Color3.fromRGB(255, 78, 78),
    KillerColor   = Color3.fromRGB(255, 78, 78),
    ItemColor     = Color3.fromRGB(255, 215, 70),
    GenColor      = Color3.fromRGB(255, 145, 40),

    Fullbright = true, InstantPP = false, Interp = 20,

    AutoAccept = true, AutoGen = true, GenDelay = 0.1,
    TPOffset = 2.5,

    Accent = Color3.fromRGB(124, 92, 255),
    ToggleKey = Enum.KeyCode.RightShift,

    ItemKeywords = { "medkit", "bread", "bloxycola", "epicsauce", "gear" },
    GenKeywords  = { "generator" },
}
local DIRS = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} }
local MAX_HL = 150

local PALETTE = {
    Color3.fromRGB(255, 78, 78), Color3.fromRGB(255, 150, 60), Color3.fromRGB(255, 215, 70),
    Color3.fromRGB(120, 255, 140), Color3.fromRGB(0, 220, 255), Color3.fromRGB(120, 140, 255),
    Color3.fromRGB(200, 120, 255), Color3.fromRGB(255, 120, 200), Color3.new(1, 1, 1),
}

local refreshers = {}

--===========================================================
-- UI KIT
--===========================================================
local function inst(cls, props, parent)
    local o = Instance.new(cls)
    for k, v in pairs(props) do o[k] = v end
    if parent then o.Parent = parent end
    return o
end
local function corner(o, r) inst("UICorner", { CornerRadius = UDim.new(0, r or 8) }, o) end
local function stroke(o, c, t) inst("UIStroke", { Color = c or Color3.fromRGB(48, 48, 62), Thickness = t or 1 }, o) end
local function pad(o, n) inst("UIPadding", {
    PaddingTop = UDim.new(0, n), PaddingBottom = UDim.new(0, n),
    PaddingLeft = UDim.new(0, n), PaddingRight = UDim.new(0, n),
}, o) end

local gui = inst("ScreenGui", {
    Name = "RUSakenHax", ResetOnSpawn = false, IgnoreGuiInset = true,
    ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 99,
}, LP:WaitForChild("PlayerGui"))

local main = inst("Frame", {
    Size = UDim2.fromOffset(372, 452), Position = UDim2.fromOffset(70, 110),
    BackgroundColor3 = Color3.fromRGB(17, 17, 22), BorderSizePixel = 0,
}, gui)
corner(main, 14)
stroke(main, Color3.fromRGB(46, 46, 60), 1)

inst("UIGradient", {
    Color = ColorSequence.new(Cfg.Accent, Color3.fromRGB(60, 40, 130)), Rotation = 25,
}, inst("Frame", { Size = UDim2.new(1, 0, 0, 4), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0 }, main))

local head = inst("Frame", {
    Size = UDim2.new(1, 0, 0, 40), BackgroundColor3 = Color3.fromRGB(23, 23, 30),
    BorderSizePixel = 0, Position = UDim2.fromOffset(0, 4),
}, main)
inst("TextLabel", {
    Text = "RUSAKEN", Font = Enum.Font.GothamBold, TextSize = 15,
    TextColor3 = Color3.new(1, 1, 1), BackgroundTransparency = 1,
    Position = UDim2.fromOffset(14, 0), Size = UDim2.new(0, 150, 1, 0),
    TextXAlignment = Enum.TextXAlignment.Left,
}, head)
inst("TextLabel", {
    Text = "v9", Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = Cfg.Accent,
    BackgroundTransparency = 1, Position = UDim2.fromOffset(96, 2),
    Size = UDim2.new(0, 30, 1, 0), TextXAlignment = Enum.TextXAlignment.Left,
}, head)

local minBtn = inst("TextButton", {
    Text = "—", Font = Enum.Font.GothamBold, TextSize = 14,
    TextColor3 = Color3.fromRGB(180, 180, 195), BackgroundTransparency = 1,
    Position = UDim2.new(1, -64, 0, 0), Size = UDim2.fromOffset(28, 40),
}, head)
local closeBtn = inst("TextButton", {
    Text = "✕", Font = Enum.Font.GothamBold, TextSize = 13,
    TextColor3 = Color3.fromRGB(180, 180, 195), BackgroundTransparency = 1,
    Position = UDim2.new(1, -32, 0, 0), Size = UDim2.fromOffset(28, 40),
}, head)

do
    local dragging, startPos, startMouse
    bind(head.InputBegan, function(i)
        if i.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging, startPos, startMouse = true, main.Position, i.Position
        end
    end)
    bind(UIS.InputChanged, function(i)
        if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then
            local d = i.Position - startMouse
            main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X,
                                      startPos.Y.Scale, startPos.Y.Offset + d.Y)
        end
    end)
    bind(UIS.InputEnded, function(i)
        if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end
    end)
end

local tabBar = inst("Frame", {
    Size = UDim2.new(0, 96, 1, -44), Position = UDim2.fromOffset(0, 44),
    BackgroundColor3 = Color3.fromRGB(20, 20, 26), BorderSizePixel = 0,
}, main)
inst("UIListLayout", { Padding = UDim.new(0, 3), SortOrder = Enum.SortOrder.LayoutOrder }, tabBar)
pad(tabBar, 6)

local content = inst("Frame", {
    Size = UDim2.new(1, -96, 1, -44), Position = UDim2.fromOffset(96, 44),
    BackgroundColor3 = Color3.fromRGB(17, 17, 22), BorderSizePixel = 0,
}, main)

local pages, tabBtns = {}, {}
local function makeTab(name, order)
    local btn = inst("TextButton", {
        Text = name, Font = Enum.Font.GothamMedium, TextSize = 12,
        TextColor3 = Color3.fromRGB(150, 150, 168), BackgroundColor3 = Color3.fromRGB(26, 26, 34),
        BorderSizePixel = 0, Size = UDim2.new(1, 0, 0, 30), LayoutOrder = order,
    }, tabBar)
    corner(btn, 7)
    local page = inst("ScrollingFrame", {
        Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0,
        ScrollBarThickness = 3, ScrollBarImageColor3 = Color3.fromRGB(60, 60, 78),
        Visible = false, CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y,
    }, content)
    inst("UIListLayout", { Padding = UDim.new(0, 5), SortOrder = Enum.SortOrder.LayoutOrder }, page)
    pad(page, 8)
    pages[name], tabBtns[name] = page, btn
    bind(btn.MouseButton1Click, function()
        for n, p in pairs(pages) do
            p.Visible = (n == name)
            Tween:Create(tabBtns[n], TweenInfo.new(0.15), {
                BackgroundColor3 = n == name and Color3.fromRGB(34, 34, 46) or Color3.fromRGB(26, 26, 34),
                TextColor3 = n == name and Color3.new(1, 1, 1) or Color3.fromRGB(150, 150, 168),
            }):Play()
        end
    end)
    return page
end

local function addLabel(page, text)
    return inst("TextLabel", {
        Text = text, Font = Enum.Font.GothamBold, TextSize = 10,
        TextColor3 = Color3.fromRGB(110, 110, 130), BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 16), TextXAlignment = Enum.TextXAlignment.Left,
    }, page)
end

local function addToggle(page, label, key, onChange)
    local row = inst("Frame", {
        Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = Color3.fromRGB(26, 26, 34), BorderSizePixel = 0,
    }, page)
    corner(row, 7)
    inst("TextLabel", {
        Text = label, Font = Enum.Font.Gotham, TextSize = 12,
        TextColor3 = Color3.fromRGB(214, 214, 226), BackgroundTransparency = 1,
        Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -56, 1, 0),
        TextXAlignment = Enum.TextXAlignment.Left,
    }, row)
    local sw = inst("Frame", {
        Size = UDim2.fromOffset(32, 17), Position = UDim2.new(1, -42, 0.5, -8.5),
        BackgroundColor3 = Color3.fromRGB(48, 48, 62), BorderSizePixel = 0,
    }, row)
    corner(sw, 9)
    local knob = inst("Frame", {
        Size = UDim2.fromOffset(13, 13), Position = UDim2.fromOffset(2, 2),
        BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0,
    }, sw)
    corner(knob, 7)
    local function render()
        Tween:Create(sw, TweenInfo.new(0.14), {
            BackgroundColor3 = Cfg[key] and Cfg.Accent or Color3.fromRGB(48, 48, 62) }):Play()
        Tween:Create(knob, TweenInfo.new(0.14), {
            Position = Cfg[key] and UDim2.new(1, -15, 0, 2) or UDim2.fromOffset(2, 2) }):Play()
    end
    bind(inst("TextButton", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "" }, row)
        .MouseButton1Click, function()
            Cfg[key] = not Cfg[key]; render()
            if onChange then onChange(Cfg[key]) end
        end)
    table.insert(refreshers, render)
    render()
    return row
end

local function addSlider(page, label, key, min, max, step, onChange)
    local row = inst("Frame", {
        Size = UDim2.new(1, 0, 0, 42), BackgroundColor3 = Color3.fromRGB(26, 26, 34),
        BorderSizePixel = 0, ClipsDescendants = true,
    }, page)
    corner(row, 7)
    local txt = inst("TextLabel", {
        Text = string.format("%s: %s", label, tostring(Cfg[key])), Font = Enum.Font.Gotham,
        TextSize = 11, TextColor3 = Color3.fromRGB(210, 210, 224), BackgroundTransparency = 1,
        Position = UDim2.fromOffset(10, 5), Size = UDim2.new(1, -20, 0, 14),
        TextXAlignment = Enum.TextXAlignment.Left,
    }, row)
    local bar = inst("Frame", {
        Size = UDim2.new(1, -20, 0, 5), Position = UDim2.new(0, 10, 0, 27),
        BackgroundColor3 = Color3.fromRGB(46, 46, 60), BorderSizePixel = 0,
    }, row)
    corner(bar, 3)
    local fill = inst("Frame", {
        Size = UDim2.new((Cfg[key] - min) / (max - min), 0, 1, 0),
        BackgroundColor3 = Cfg.Accent, BorderSizePixel = 0,
    }, bar)
    corner(fill, 3)
    local dragBtn = inst("TextButton", {
        Size = UDim2.new(1, 0, 0, 20), Position = UDim2.fromOffset(0, 20),
        BackgroundTransparency = 1, Text = "",
    }, row)

    local function paint(v)
        txt.Text = string.format("%s: %s", label, tostring(v))
        fill.Size = UDim2.new((v - min) / (max - min), 0, 1, 0)
    end
    local function setVal(v)
        v = math.floor(math.clamp(v, min, max) / step + 0.5) * step
        Cfg[key] = v
        paint(v)
        if onChange then onChange(v) end
    end

    local dragging
    bind(dragBtn.MouseButton1Down, function() dragging = true end)
    bind(UIS.InputEnded, function(i)
        if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end
    end)
    bind(UIS.InputChanged, function(i)
        if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then
            local a = (i.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X
            setVal(min + a * (max - min))
        end
    end)
    table.insert(refreshers, function() paint(Cfg[key]) end)
    return row
end

local function addButton(page, label, cb)
    local b = inst("TextButton", {
        Text = label, Font = Enum.Font.GothamMedium, TextSize = 12,
        TextColor3 = Color3.fromRGB(220, 220, 232), BackgroundColor3 = Color3.fromRGB(32, 32, 42),
        BorderSizePixel = 0, Size = UDim2.new(1, 0, 0, 28),
    }, page)
    corner(b, 7)
    bind(b.MouseEnter, function() Tween:Create(b, TweenInfo.new(0.12), { BackgroundColor3 = Cfg.Accent }):Play() end)
    bind(b.MouseLeave, function() Tween:Create(b, TweenInfo.new(0.12), { BackgroundColor3 = Color3.fromRGB(32, 32, 42) }):Play() end)
    bind(b.MouseButton1Click, cb)
    return b
end

local listeningKey = false
local function addKeybind(page, label, key)
    local row = inst("Frame", {
        Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = Color3.fromRGB(26, 26, 34), BorderSizePixel = 0,
    }, page)
    corner(row, 7)
    inst("TextLabel", {
        Text = label, Font = Enum.Font.Gotham, TextSize = 12,
        TextColor3 = Color3.fromRGB(214, 214, 226), BackgroundTransparency = 1,
        Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -70, 1, 0),
        TextXAlignment = Enum.TextXAlignment.Left,
    }, row)
    local b = inst("TextButton", {
        Text = Cfg[key].Name, Font = Enum.Font.GothamBold, TextSize = 11,
        TextColor3 = Color3.new(1, 1, 1), BackgroundColor3 = Color3.fromRGB(42, 42, 56),
        BorderSizePixel = 0, Position = UDim2.new(1, -62, 0.5, -9), Size = UDim2.fromOffset(54, 18),
    }, row)
    corner(b, 5)
    bind(b.MouseButton1Click, function() listeningKey = true; b.Text = "..." end)
    bind(UIS.InputBegan, function(i, gp)
        if listeningKey and not gp and i.KeyCode ~= Enum.KeyCode.Unknown then
            Cfg[key] = i.KeyCode
            b.Text = i.KeyCode.Name
            listeningKey = false
        end
    end)
    table.insert(refreshers, function() b.Text = Cfg[key].Name end)
    return row
end

local function addColorPicker(page, label, key)
    local row = inst("Frame", {
        Size = UDim2.new(1, 0, 0, 46), BackgroundColor3 = Color3.fromRGB(26, 26, 34), BorderSizePixel = 0,
    }, page)
    corner(row, 7)
    inst("TextLabel", {
        Text = label, Font = Enum.Font.Gotham, TextSize = 11,
        TextColor3 = Color3.fromRGB(210, 210, 224), BackgroundTransparency = 1,
        Position = UDim2.fromOffset(10, 4), Size = UDim2.new(1, -20, 0, 14),
        TextXAlignment = Enum.TextXAlignment.Left,
    }, row)
    local holder = inst("Frame", {
        Size = UDim2.new(1, -20, 0, 16), Position = UDim2.fromOffset(10, 23), BackgroundTransparency = 1,
    }, row)
    inst("UIListLayout", { Padding = UDim.new(0, 3), FillDirection = Enum.FillDirection.Horizontal }, holder)

    local function markSelected()
        for _, other in ipairs(holder:GetChildren()) do
            if other:IsA("TextButton") then
                local st = other:FindFirstChildOfClass("UIStroke")
                if st then
                    st.Color = other.BackgroundColor3 == Cfg[key] and Cfg.Accent or Color3.fromRGB(60, 60, 78)
                end
            end
        end
    end

    for _, col in ipairs(PALETTE) do
        local sw = inst("TextButton", {
            Size = UDim2.fromOffset(16, 16), BackgroundColor3 = col, BorderSizePixel = 0,
            Text = "", AutoButtonColor = false,
        }, holder)
        corner(sw, 4)
        inst("UIStroke", { Color = Color3.fromRGB(60, 60, 78), Thickness = 1 }, sw)
        bind(sw.MouseButton1Click, function()
            Cfg[key] = col
            markSelected()
        end)
    end
    table.insert(refreshers, markSelected)
    markSelected()
    return row
end

local function addKeywordBox(page, label, key)
    local row = inst("Frame", {
        Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = Color3.fromRGB(26, 26, 34), BorderSizePixel = 0,
    }, page)
    corner(row, 7)
    local box = inst("TextBox", {
        Text = "", PlaceholderText = label, Font = Enum.Font.Gotham, TextSize = 11,
        TextColor3 = Color3.new(1, 1, 1), PlaceholderColor3 = Color3.fromRGB(110, 110, 130),
        BackgroundTransparency = 1, Position = UDim2.fromOffset(10, 0),
        Size = UDim2.new(1, -20, 1, 0), TextXAlignment = Enum.TextXAlignment.Left,
        ClearTextOnFocus = true,
    }, row)
    bind(box.FocusLost, function()
        for word in box.Text:gmatch("[^,;%s]+") do
            local w = word:lower()
            local exists = false
            for _, k in ipairs(Cfg[key]) do if k == w then exists = true break end end
            if not exists then table.insert(Cfg[key], w) end
        end
        box.Text = ""
    end)
    return row
end

--===========================================================
-- СКОРОСТЬ
--===========================================================
local function setMult(folderName, name, value)
    local f = Char and Char:FindFirstChild(folderName)
    if not f then return end
    local v = f:FindFirstChild(name)
    if not v then v = Instance.new("NumberValue"); v.Name = name; v.Parent = f end
    v.Value = value
end

local function speedTarget()
    local base = (Hum and Hum:GetAttribute("BaseSpeed")) or 16
    local folder = Char and Char:FindFirstChild("SpeedMultipliers")
    local product = 1
    if folder then
        for _, v in ipairs(folder:GetChildren()) do
            if v.Name ~= "__spd" and v:IsA("NumberValue") then product *= v.Value end
        end
    end
    if product <= 0 then product = 1 end
    return Cfg.Speed * math.max(product, 1), base, product
end

local function applyStats()
    local target, base, product = speedTarget()
    setMult("SpeedMultipliers", "__spd", target / (base * product))
    setMult("FOVMultipliers", "__fov", Cfg.FOV / 70)
end
applyStats()

local function counteractSlowdown()
    local target, base, product = speedTarget()
    if LP:GetAttribute("SpeedMultipliersDisabled") then
        if Hum.WalkSpeed < Cfg.Speed then Hum.WalkSpeed = Cfg.Speed end
        return
    end
    setMult("SpeedMultipliers", "__spd", target / (base * product))
end

local function lockSpeed()
    local target, base, product = speedTarget()
    if not LP:GetAttribute("SpeedMultipliersDisabled") then
        setMult("SpeedMultipliers", "__spd", target / (base * product))
    end
    if math.abs(Hum.WalkSpeed - target) > 0.05 then
        Hum.WalkSpeed = target
    end
end

local function hookWalkSpeed()
    if not Hum then return end
    bind(Hum:GetPropertyChangedSignal("WalkSpeed"), function()
        if not Cfg.LoopSpeed then return end
        local target = speedTarget()
        if math.abs(Hum.WalkSpeed - target) > 0.05 then
            Hum.WalkSpeed = target
        end
    end)
end
hookWalkSpeed()

--===========================================================
-- АНТИ-СТАН
--===========================================================
local function antiStun()
    local root = Char and Char.PrimaryPart
    if not root then return end
    if root.Anchored then root.Anchored = false end
    local ragdolled = Char:GetAttribute("Ragdolling")
    if Hum.PlatformStand and not ragdolled then Hum.PlatformStand = false end
    if Char:GetAttribute("Stunned") then Char:SetAttribute("Stunned", false) end
    if not ragdolled and Hum:GetState() == Enum.HumanoidStateType.Physics then
        Hum:ChangeState(Enum.HumanoidStateType.Running)
    end
end

local Initializer = require(RS:WaitForChild("Initializer"))
repeat task.wait(0.1) until Initializer.Loaded
task.spawn(function()
    while Running and task.wait(0.15) do
        local S = Initializer.CharacterSystems and Initializer.CharacterSystems.Sprinting
        if S and S.__sprintedEvent then
            if Cfg.InfStamina then
                S.StaminaLossDisabled = true
                S.Stamina = S.MaxStamina
            end
            if Cfg.AutoSprint then
                S.CanSprint = true
                if not S.IsSprinting then
                    S.IsSprinting = true
                    S.__sprintedEvent:Fire(true, false)
                end
            end
        end
    end
end)

bind(workspace:WaitForChild("Hitboxes").ChildAdded, function(p)
    if not Cfg.HitboxESP or p:GetAttribute("Hidden") then return end
    p.Material = Enum.Material.ForceField
    p.Transparency = 0.12
    p.Color = Cfg.HitboxColor
    p.Size = p.Size * Cfg.HitboxScale
end)

--===========================================================
-- ХИТБОКС-ЭКСПАНДЕР
--===========================================================
local hbOriginal = {}
local function hitboxTarget(ch)
    return ch:FindFirstChild("QueryHitbox") or ch:FindFirstChild("HumanoidRootPart")
end
local function restoreHitboxes()
    for part, data in pairs(hbOriginal) do
        if part.Parent then
            pcall(function()
                part.Size = data.size
                part.Transparency = data.transp
                part.CanCollide = data.collide
                part.Color = data.color
            end)
        end
    end
    table.clear(hbOriginal)
end
local function applyHitboxes()
    for _, plr in ipairs(Players:GetPlayers()) do
        if plr ~= LP and plr.Character then
            local part = hitboxTarget(plr.Character)
            if part and part:IsA("BasePart") then
                if not hbOriginal[part] then
                    hbOriginal[part] = {
                        size = part.Size, transp = part.Transparency,
                        collide = part.CanCollide, color = part.Color,
                    }
                end
                part.Size = Vector3.new(Cfg.HitboxExpand, Cfg.HitboxExpand, Cfg.HitboxExpand)
                part.Transparency = 0.7
                part.Color = Color3.fromRGB(140, 40, 180)
                part.CanCollide = false
            end
        end
    end
end

--===========================================================
-- ПОСТОБРАБОТКА
--===========================================================
local ppStore = {}
local ppHook
local function enablePP()
    for _, e in ipairs(Lighting:GetChildren()) do
        if e:IsA("PostEffect") then ppStore[e] = e.Enabled; e.Enabled = false end
    end
    ppStore.__fog = { Lighting.FogStart, Lighting.FogEnd }
    Lighting.FogStart, Lighting.FogEnd = 100000, 1000000
    ppHook = Lighting.ChildAdded:Connect(function(e)
        if e:IsA("PostEffect") then ppStore[e] = e.Enabled; e.Enabled = false end
    end)
end
local function disablePP()
    if ppHook then ppHook:Disconnect(); ppHook = nil end
    for k, v in pairs(ppStore) do
        if typeof(k) == "Instance" and k.Parent then k.Enabled = v end
    end
    local fog = ppStore.__fog
    if fog then Lighting.FogStart, Lighting.FogEnd = fog[1], fog[2] end
    table.clear(ppStore)
end

--===========================================================
-- ESP ИГРОКОВ
--===========================================================
local esp = {}
local function dropESP(m)
    local e = esp[m]; if not e then return end
    for _, d in pairs(e) do pcall(function() d:Remove() end) end
    esp[m] = nil
end
local function buildESP(m)
    if esp[m] then return end
    local box = Drawing.new("Square"); box.Thickness = 1; box.Filled = false
    local name = Drawing.new("Text"); name.Size = 14; name.Center = true; name.Outline = true
    local hp = Drawing.new("Text"); hp.Size = 13; hp.Center = true; hp.Outline = true
    local tr = Drawing.new("Line"); tr.Thickness = 1
    esp[m] = { box = box, name = name, hp = hp, tr = tr }
end

--===========================================================
-- ESP ПРЕДМЕТОВ (Tool) И ГЕНЕРАТОРОВ
--===========================================================
local hl = {}
local hlCount = 0

local function isPlayerChar(obj)
    local p = obj
    for _ = 1, 5 do
        if not p or p == workspace then break end
        if Players:GetPlayerFromCharacter(p) then return true end
        p = p.Parent
    end
    return false
end

local function matches(name, list)
    local n = name:lower()
    for _, k in ipairs(list) do
        if n:find(k, 1, true) then return true end
    end
    return false
end

local function isItemLike(obj)
    return obj:IsA("Tool") or matches(obj.Name, Cfg.ItemKeywords)
end

-- Highlight нельзя прицепить к Tool, только к BasePart/Model
local function resolveAdornee(obj)
    if obj:IsA("BasePart") then return obj end
    if obj:IsA("Model") then return obj end
    if obj:IsA("Tool") then
        return obj:FindFirstChild("Handle") or obj:FindFirstChildWhichIsA("BasePart", true)
    end
    return nil
end

local function parentMatches(obj)
    local p = obj.Parent
    for _ = 1, 4 do
        if not p or p == workspace then return false end
        if Cfg.GenESP and matches(p.Name, Cfg.GenKeywords) then return true end
        if Cfg.ItemESP and isItemLike(p) then return true end
        p = p.Parent
    end
    return false
end

local function classify(obj)
    if not obj.Parent then return end

    local cat
    if Cfg.GenESP and matches(obj.Name, Cfg.GenKeywords) then
        cat = "gen"
    elseif Cfg.ItemESP and isItemLike(obj) then
        cat = "item"
    end
    if not cat then return end

    if not (obj:IsA("Model") or obj:IsA("BasePart") or obj:IsA("Tool")) then return end
    if isPlayerChar(obj) then return end
    if obj:FindFirstAncestorOfClass("Backpack") then return end
    if parentMatches(obj) then return end

    return cat
end

local function addHL(obj, cat)
    if hl[obj] or hlCount >= MAX_HL then return end
    local adornee = resolveAdornee(obj)

    local h = Instance.new("Highlight")
    h.Name = "RUSakenESP"
    h.FillColor = cat == "gen" and Cfg.GenColor or Cfg.ItemColor
    h.OutlineColor = h.FillColor
    h.FillTransparency = 0.7
    h.OutlineTransparency = 0
    h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    h.Adornee = adornee
    h.Parent = obj
    hl[obj] = { h = h, cat = cat }
    hlCount += 1

    if not adornee then
        task.spawn(function()
            for _ = 1, 25 do
                task.wait(0.1)
                if not Running or not obj.Parent then return end
                local a = resolveAdornee(obj)
                if a then
                    local rec = hl[obj]
                    if rec then rec.h.Adornee = a end
                    return
                end
            end
        end)
    end
end

local function killHL(obj)
    local rec = hl[obj]; if not rec then return end
    pcall(function() rec.h:Destroy() end)
    hl[obj] = nil
    hlCount -= 1
end

task.spawn(function()
    local list = workspace:GetDescendants()
    for i = 1, #list, 400 do
        if not Running then return end
        for j = i, math.min(i + 399, #list) do
            local cat = classify(list[j])
            if cat then addHL(list[j], cat) end
        end
        task.wait()
    end
end)

bind(workspace.DescendantAdded, function(obj)
    if not Running then return end
    local cat = classify(obj)
    if cat then addHL(obj, cat) end
end)

task.spawn(function()
    while Running and task.wait(3) do
        for obj, rec in pairs(hl) do
            local alive = obj.Parent and rec.h.Parent
                and ((rec.cat == "gen" and Cfg.GenESP) or (rec.cat == "item" and Cfg.ItemESP))
            if not alive then
                killHL(obj)
            else
                if not rec.h.Adornee then rec.h.Adornee = resolveAdornee(obj) end
                local col = rec.cat == "gen" and Cfg.GenColor or Cfg.ItemColor
                if rec.h.FillColor ~= col then
                    rec.h.FillColor = col
                    rec.h.OutlineColor = col
                end
            end
        end
    end
end)

--===========================================================
-- АВТО
--===========================================================
bind(LP.PlayerGui:WaitForChild("TemporaryUI").ChildAdded, function(o)
    if not Cfg.AutoAccept or o.Name ~= "RequestPrompt" then return end
    task.wait(0.15)
    local c = o:FindFirstChild("Choices")
    if not c then return end
    for _, b in ipairs(c:GetChildren()) do
        if b:IsA("TextButton") and b.Name ~= "Cancel" then
            if firesignal then pcall(firesignal, b.MouseButton1Click) end
            break
        end
    end
end)

local function tpTo(model)
    local root = Char and Char.PrimaryPart
    local tgt = model and (model:FindFirstChild("HumanoidRootPart") or model.PrimaryPart)
    if root and tgt then Char:PivotTo(tgt.CFrame * CFrame.new(0, 0, Cfg.TPOffset)) end
end
local function nearest(folder)
    local f, best, bd = workspace.Players:FindFirstChild(folder), nil, math.huge
    if not f or not Char.PrimaryPart then return end
    for _, m in ipairs(f:GetChildren()) do
        local hum = m:FindFirstChildOfClass("Humanoid")
        if hum and hum.Health > 0 and m.PrimaryPart then
            local d = (m.PrimaryPart.Position - Char.PrimaryPart.Position).Magnitude
            if d < bd then bd, best = d, m end
        end
    end
    return best
end

local FlowManager, FlowOldStart
local function solvePuzzle()
    local g = FlowManager and FlowManager.activeGame
    if not g or g.gameEnded or not g.Solution then return end
    for color, cells in pairs(g.Solution) do
        local set = {}
        for _, c in ipairs(cells) do set[c.row .. "|" .. c.col] = true end
        local pair = g.targetPairs[color]
        if pair and pair[1] and pair[2] then
            local start, finish = pair[1], pair[2]
            local seen = { [start.row .. "|" .. start.col] = true }
            local path = { { row = start.row, col = start.col } }
            local cur = start
            for _ = 1, 1024 do
                if cur.row == finish.row and cur.col == finish.col then break end
                local nxt
                for _, d in ipairs(DIRS) do
                    local r, c = cur.row + d[1], cur.col + d[2]
                    local k = r .. "|" .. c
                    if set[k] and not seen[k] then nxt = { row = r, col = c }; break end
                end
                if not nxt then break end
                seen[nxt.row .. "|" .. nxt.col] = true
                table.insert(path, nxt)
                cur = nxt
            end
            if #path >= 2 then g.paths[color] = path end
        end
    end
    g:updateGui()
    g:checkForWin()
end

task.spawn(function()
    local ok, Manager = pcall(require, RS:WaitForChild("Modules"):WaitForChild("Misc"):WaitForChild("FlowGameManager"))
    if not ok or not Manager or not Running then return end
    FlowManager, FlowOldStart = Manager, Manager.startGame
    Manager.startGame = function(self, ...)
        FlowOldStart(self, ...)
        if Cfg.AutoGen then task.delay(Cfg.GenDelay, solvePuzzle) end
    end
    if Manager.activeGame and Cfg.AutoGen then task.delay(0.6, solvePuzzle) end
end)

--===========================================================
-- ПЕРСОНАЖ
--===========================================================
local charParts = {}
local function refreshCharParts()
    table.clear(charParts)
    if not Char then return end
    for _, p in ipairs(Char:GetDescendants()) do
        if p:IsA("BasePart") then table.insert(charParts, p) end
    end
end
refreshCharParts()
bind(Char.DescendantAdded, function(p)
    if p:IsA("BasePart") then table.insert(charParts, p) end
end)

--===========================================================
-- ОКРУЖЕНИЕ
--===========================================================
workspace:SetAttribute("cl_interp", Cfg.Interp)
Lighting.Brightness, Lighting.ClockTime = 3, 14
Lighting.Ambient = Color3.fromRGB(170, 170, 170)
Lighting.OutdoorAmbient = Color3.fromRGB(170, 170, 170)

bind(UIS.JumpRequest, function()
    if Cfg.InfJump and Hum then Hum:ChangeState(Enum.HumanoidStateType.Jumping) end
end)

--===========================================================
-- RENDER LOOP
--===========================================================
bind(RunService.RenderStepped, function(dt)
    if not Running then return end
    local cam = workspace.CurrentCamera
    local root = Char and Char.PrimaryPart

    if Cfg.AntiStun then antiStun() end
    if Cfg.LoopSpeed then lockSpeed() elseif Cfg.NoSlowdown then counteractSlowdown() end
    if Cfg.HitboxExpandOn then applyHitboxes() end

    if next(esp) then
        for m, e in pairs(esp) do
            local part, hum = m.PrimaryPart, m:FindFirstChildOfClass("Humanoid")
            local dist = (part and root) and (part.Position - root.Position).Magnitude or 1e9

            if not (part and hum and hum.Health > 0) or not Cfg.PlayerESP or dist > Cfg.ESPMaxDist then
                e.box.Visible = false; e.name.Visible = false; e.hp.Visible = false; e.tr.Visible = false
                continue
            end

            local top = cam:WorldToViewportPoint(part.Position + Vector3.new(0, 2.6, 0))
            local bot = cam:WorldToViewportPoint(part.Position - Vector3.new(0, 2.6, 0))
            if top.Z <= 0 or bot.Z <= 0 then
                e.box.Visible = false; e.name.Visible = false; e.hp.Visible = false; e.tr.Visible = false
                continue
            end

            local col = (m.Parent and m.Parent.Name == "Killers") and Cfg.KillerColor or Cfg.SurvivorColor
            local h = bot.Y - top.Y

            e.box.Size = Vector2.new(h * 0.55, h)
            e.box.Position = Vector2.new(top.X - h * 0.275, top.Y)
            e.box.Color = col
            e.box.Visible = true

            e.name.Text = string.format("%s [%d]", m.Name, math.floor(dist))
            e.name.Position = Vector2.new(top.X, top.Y - 16)
            e.name.Color = col
            e.name.Visible = true

            e.hp.Text = tostring(math.floor(hum.Health))
            e.hp.Position = Vector2.new(top.X, bot.Y + 2)
            e.hp.Color = col
            e.hp.Visible = Cfg.ESPHealth

            if Cfg.ESPTracers then
                local s = cam:WorldToViewportPoint(cam.CFrame.Position)
                e.tr.From = Vector2.new(s.X, s.Y + 40)
                e.tr.To = Vector2.new(top.X, bot.Y)
                e.tr.Color = col
                e.tr.Visible = true
            else
                e.tr.Visible = false
            end
        end
    end

    if Cfg.Noclip then
        for _, p in ipairs(charParts) do
            if p.CanCollide then p.CanCollide = false end
        end
    end

    if Cfg.Fly and root then
        local dir = Vector3.zero
        if UIS:IsKeyDown(Enum.KeyCode.W) then dir += cam.CFrame.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.S) then dir -= cam.CFrame.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.A) then dir -= cam.CFrame.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.D) then dir += cam.CFrame.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.Space) then dir += Vector3.yAxis end
        if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then dir -= Vector3.yAxis end
        root.AssemblyLinearVelocity = Vector3.zero
        if dir.Magnitude > 0 then
            root.CFrame += dir.Unit * Cfg.FlySpeed * dt
        end
    end
end)

--===========================================================
-- СКАН ИГРОКОВ
--===========================================================
task.spawn(function()
    while Running and task.wait(0.75) do
        for _, folder in ipairs({ "Survivors", "Killers" }) do
            local f = workspace.Players:FindFirstChild(folder)
            if f then
                for _, m in ipairs(f:GetChildren()) do
                    if m:FindFirstChildOfClass("Humanoid") then
                        if Cfg.PlayerESP then buildESP(m) else dropESP(m) end
                    end
                end
            end
        end
    end
end)

bind(LP.CharacterAdded, function(c)
    Char = c
    Hum = c:WaitForChild("Humanoid")
    task.wait(1)
    applyStats()
    hookWalkSpeed()
    refreshCharParts()
    bind(Char.DescendantAdded, function(p)
        if p:IsA("BasePart") then table.insert(charParts, p) end
    end)
end)

bind(UIS.InputBegan, function(i, gp)
    if gp or listeningKey or UIS:GetFocusedTextBox() then return end
    if i.KeyCode == Cfg.ToggleKey then
        main.Visible = not main.Visible
    elseif i.KeyCode == Enum.KeyCode.Z then
        tpTo(nearest("Survivors"))
    elseif i.KeyCode == Enum.KeyCode.X then
        tpTo(nearest("Killers"))
    end
end)

--===========================================================
-- СТРАНИЦЫ
--===========================================================
local pgMove = makeTab("Движение", 1)
addLabel(pgMove, "ПАРАМЕТРЫ")
addToggle(pgMove, "Бесконечная стамина", "InfStamina")
addToggle(pgMove, "Авто-спринт", "AutoSprint")
addToggle(pgMove, "Игнорировать замедление", "NoSlowdown")
addToggle(pgMove, "Жёсткая фиксация скорости (loop)", "LoopSpeed")
addToggle(pgMove, "Анти-стан", "AntiStun")
addSlider(pgMove, "Скорость", "Speed", 16, 120, 1, function()
    applyStats()
end)
addSlider(pgMove, "FOV", "FOV", 70, 130, 1, function()
    setMult("FOVMultipliers", "__fov", Cfg.FOV / 70)
end)
addSlider(pgMove, "Скорость полёта", "FlySpeed", 20, 200, 5)
addLabel(pgMove, "ПЕРЕМЕЩЕНИЕ")
addToggle(pgMove, "Полёт (WASD + Space/LCtrl)", "Fly")
addToggle(pgMove, "Noclip", "Noclip", function(on)
    if not on then
        for _, p in ipairs(charParts) do p.CanCollide = true end
    end
end)
addToggle(pgMove, "Бесконечный прыжок", "InfJump")
addSlider(pgMove, "Отступ телепорта", "TPOffset", 0, 8, 0.5)

local pgCombat = makeTab("Бой / TP", 2)
addLabel(pgCombat, "ХИТБОКС")
addToggle(pgCombat, "Расширение хитбокса", "HitboxExpandOn", function(on)
    if not on then restoreHitboxes() end
end)
addSlider(pgCombat, "Размер хитбокса", "HitboxExpand", 1, 69, 1)
addLabel(pgCombat, "ТЕЛЕПОРТ")
addButton(pgCombat, "К ближайшему выжившему  [Z]", function() tpTo(nearest("Survivors")) end)
addButton(pgCombat, "К убийце  [X]", function() tpTo(nearest("Killers")) end)
addLabel(pgCombat, "ВЫЖИВШИЕ")
local listFrame = inst("Frame", { Size = UDim2.new(1, 0, 0, 150), BackgroundTransparency = 1 }, pgCombat)
inst("UIListLayout", { Padding = UDim.new(0, 3) }, listFrame)
local lastSig = ""
local function refreshList()
    local f = workspace.Players:FindFirstChild("Survivors")
    local sig = ""
    if f then
        for _, m in ipairs(f:GetChildren()) do
            if m:FindFirstChildOfClass("Humanoid") then sig ..= m.Name .. "," end
        end
    end
    if sig == lastSig then return end
    lastSig = sig
    for _, c in ipairs(listFrame:GetChildren()) do
        if c:IsA("TextButton") then c:Destroy() end
    end
    if not f then return end
    for _, m in ipairs(f:GetChildren()) do
        if m:FindFirstChildOfClass("Humanoid") then
            addButton(listFrame, m.Name, function() tpTo(m) end)
        end
    end
end
task.spawn(function()
    while Running and task.wait(1) do
        if pgCombat.Visible then refreshList() end
    end
end)

local pgVis = makeTab("Визуал", 3)
addLabel(pgVis, "ИГРОКИ")
addToggle(pgVis, "ESP игроков", "PlayerESP")
addToggle(pgVis, "Линии", "ESPTracers")
addToggle(pgVis, "Полоска HP", "ESPHealth")
addColorPicker(pgVis, "Цвет выживших", "SurvivorColor")
addColorPicker(pgVis, "Цвет убийц", "KillerColor")
addSlider(pgVis, "Дистанция ESP", "ESPMaxDist", 50, 2000, 25)
addLabel(pgVis, "ПРЕДМЕТЫ (Tool)")
addToggle(pgVis, "Подсветка предметов", "ItemESP")
addColorPicker(pgVis, "Цвет предметов", "ItemColor")
addKeywordBox(pgVis, "Доп. имена предметов", "ItemKeywords")
addLabel(pgVis, "ГЕНЕРАТОРЫ")
addToggle(pgVis, "Подсветка генераторов", "GenESP")
addColorPicker(pgVis, "Цвет генераторов", "GenColor")
addKeywordBox(pgVis, "Доп. имена генераторов", "GenKeywords")
addLabel(pgVis, "ХИТБОКСЫ")
addToggle(pgVis, "Подсветка хитбоксов", "HitboxESP")
addSlider(pgVis, "Масштаб хитбокса", "HitboxScale", 1, 3, 0.1)
addLabel(pgVis, "МИР")
addToggle(pgVis, "Мгновенная постобработка (PP)", "InstantPP", function(on)
    if on then enablePP() else disablePP() end
end)
addToggle(pgVis, "Fullbright", "Fullbright", function(on)
    Lighting.Brightness = on and 3 or 1
    Lighting.Ambient = on and Color3.fromRGB(170, 170, 170) or Color3.fromRGB(70, 70, 70)
    Lighting.OutdoorAmbient = on and Color3.fromRGB(170, 170, 170) or Color3.fromRGB(70, 70, 70)
end)
addSlider(pgVis, "cl_interp", "Interp", 1, 30, 1, function(v)
    workspace:SetAttribute("cl_interp", v)
end)

local pgAuto = makeTab("Авто", 4)
addLabel(pgAuto, "ГЕНЕРАТОРЫ")
addToggle(pgAuto, "Авто-решение пазла", "AutoGen")
addSlider(pgAuto, "Задержка", "GenDelay", 0, 5, 0.05)
addButton(pgAuto, "Решить сейчас", solvePuzzle)
addLabel(pgAuto, "ЗАПРОСЫ")
addToggle(pgAuto, "Авто-принятие запросов", "AutoAccept")

--===========================================================
-- КОНФИГИ (.json)
--===========================================================
local CFG_DIR = "RUSakenHax"
local cfgName = "default"

local function fsOk()
    return type(writefile) == "function" and type(readfile) == "function"
        and type(isfile) == "function" and type(listfiles) == "function"
end
local function ensureDir()
    if not fsOk() then return false end
    if type(isfolder) == "function" and type(makefolder) == "function" then
        if not isfolder(CFG_DIR) then pcall(makefolder, CFG_DIR) end
        return isfolder(CFG_DIR)
    end
    return true
end
local function sanitize(n)
    n = tostring(n or ""):gsub("[^%w%-_]", "")
    if n == "" then n = "default" end
    return n
end
local function cfgPath(n) return CFG_DIR .. "/" .. sanitize(n) .. ".json" end

local function serialize()
    local out = {}
    for k, v in pairs(Cfg) do
        if typeof(v) == "EnumItem" then out[k] = "E:" .. v.Name
        elseif typeof(v) == "Color3" then out[k] = { v.R, v.G, v.B }
        else out[k] = v end
    end
    return HttpService:JSONEncode(out)
end

local function applyLoaded()
    for _, fn in ipairs(refreshers) do pcall(fn) end
    applyStats()
    workspace:SetAttribute("cl_interp", Cfg.Interp)
    if Cfg.InstantPP then enablePP() else disablePP() end
    Lighting.Brightness = Cfg.Fullbright and 3 or 1
    Lighting.Ambient = Cfg.Fullbright and Color3.fromRGB(170, 170, 170) or Color3.fromRGB(70, 70, 70)
    Lighting.OutdoorAmbient = Lighting.Ambient
    if not Cfg.Noclip then
        for _, p in ipairs(charParts) do p.CanCollide = true end
    end
    if not Cfg.HitboxExpandOn then restoreHitboxes() end
end

local function loadFrom(name)
    if not ensureDir() then return false, "нет файлового API" end
    local path = cfgPath(name)
    if not isfile(path) then return false, "файл не найден" end
    local ok, raw = pcall(readfile, path)
    if not ok then return false, "ошибка чтения" end
    local ok2, data = pcall(function() return HttpService:JSONDecode(raw) end)
    if not ok2 or type(data) ~= "table" then return false, "битый json" end
    for k, v in pairs(data) do
        if type(v) == "string" and v:sub(1, 2) == "E:" then
            local okE, enum = pcall(function() return Enum.KeyCode[v:sub(3)] end)
            if okE then Cfg[k] = enum end
        elseif type(v) == "table" and #v == 3 and type(v[1]) == "number" then
            Cfg[k] = Color3.new(v[1], v[2], v[3])
        else
            Cfg[k] = v
        end
    end
    applyLoaded()
    return true
end

local function saveAs(name)
    if not ensureDir() then return false, "нет файлового API" end
    local ok, res = pcall(writefile, cfgPath(name), serialize())
    if not ok then return false, tostring(res) end
    return true
end

local pgCfg = makeTab("Конфиг", 5)
addLabel(pgCfg, "ИНТЕРФЕЙС")
addKeybind(pgCfg, "Клавиша меню", "ToggleKey")
addLabel(pgCfg, "ИМЯ КОНФИГА")

local nameRow = inst("Frame", {
    Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = Color3.fromRGB(26, 26, 34), BorderSizePixel = 0,
}, pgCfg)
corner(nameRow, 7)
local nameBox = inst("TextBox", {
    Text = cfgName, Font = Enum.Font.Gotham, TextSize = 12,
    TextColor3 = Color3.new(1, 1, 1), BackgroundTransparency = 1,
    Position = UDim2.fromOffset(10, 0), Size = UDim2.new(1, -20, 1, 0),
    TextXAlignment = Enum.TextXAlignment.Left, ClearTextOnFocus = false,
}, nameRow)
bind(nameBox.FocusLost, function()
    cfgName = sanitize(nameBox.Text)
    nameBox.Text = cfgName
end)

local statusLbl = inst("TextLabel", {
    Text = "", Font = Enum.Font.Gotham, TextSize = 10,
    TextColor3 = Color3.fromRGB(140, 140, 160), BackgroundTransparency = 1,
    Size = UDim2.new(1, 0, 0, 14), TextXAlignment = Enum.TextXAlignment.Left,
}, pgCfg)

local cfgList = inst("ScrollingFrame", {
    Size = UDim2.new(1, 0, 0, 128), BackgroundColor3 = Color3.fromRGB(22, 22, 28),
    BorderSizePixel = 0, ScrollBarThickness = 3,
    ScrollBarImageColor3 = Color3.fromRGB(60, 60, 78), CanvasSize = UDim2.new(),
    AutomaticCanvasSize = Enum.AutomaticSize.Y,
}, pgCfg)
corner(cfgList, 7)
inst("UIListLayout", { Padding = UDim.new(0, 3) }, cfgList)
pad(cfgList, 4)

local function refreshCfgList()
    for _, c in ipairs(cfgList:GetChildren()) do
        if c:IsA("Frame") then c:Destroy() end
    end
    if not fsOk() then
        statusLbl.Text = "файловый API недоступен"
        return
    end
    ensureDir()
    local ok, files = pcall(listfiles, CFG_DIR)
    if not ok or type(files) ~= "table" then
        statusLbl.Text = "папка недоступна"
        return
    end
    local count = 0
    for _, path in ipairs(files) do
        if tostring(path):lower():sub(-5) == ".json" then
            count += 1
            local name = tostring(path):match("([^/\\]+)%.json$") or tostring(path)
            local row = inst("Frame", {
                Size = UDim2.new(1, 0, 0, 24), BackgroundColor3 = Color3.fromRGB(30, 30, 38),
                BorderSizePixel = 0,
            }, cfgList)
            corner(row, 5)
            local loadBtn = inst("TextButton", {
                Text = "  " .. name, Font = Enum.Font.Gotham, TextSize = 11,
                TextColor3 = Color3.fromRGB(215, 215, 228), BackgroundTransparency = 1,
                Size = UDim2.new(1, -30, 1, 0), TextXAlignment = Enum.TextXAlignment.Left,
            }, row)
            bind(loadBtn.MouseButton1Click, function()
                local okL, err = loadFrom(name)
                statusLbl.Text = okL and ("загружен: " .. name) or ("ошибка: " .. tostring(err))
            end)
            local delBtn = inst("TextButton", {
                Text = "✕", Font = Enum.Font.GothamBold, TextSize = 11,
                TextColor3 = Color3.fromRGB(255, 120, 120), BackgroundTransparency = 1,
                Position = UDim2.new(1, -26, 0, 0), Size = UDim2.fromOffset(24, 24),
            }, row)
            bind(delBtn.MouseButton1Click, function()
                if type(delfile) == "function" then
                    pcall(delfile, cfgPath(name))
                    statusLbl.Text = "удалён: " .. name
                    refreshCfgList()
                end
            end)
        end
    end
    statusLbl.Text = ("конфигов: %d"):format(count)
end

addButton(pgCfg, "Сохранить как", function()
    local okS, err = saveAs(cfgName)
    statusLbl.Text = okS and ("сохранён: " .. cfgName) or ("ошибка: " .. tostring(err))
    refreshCfgList()
end)
addButton(pgCfg, "Обновить список", refreshCfgList)
addButton(pgCfg, "Сбросить позицию окна", function() main.Position = UDim2.fromOffset(70, 110) end)
addLabel(pgCfg, "ВЫГРУЗКА")
local unloadBtn = addButton(pgCfg, "Выгрузить чит", function() end)

refreshCfgList()
if isfile and isfile(cfgPath("default")) then pcall(loadFrom, "default") end

--===========================================================
-- UNLOAD
--===========================================================
local function unload()
    if not Running then return end
    Running = false

    for _, c in ipairs(Conns) do pcall(function() c:Disconnect() end) end
    table.clear(Conns)

    for m in pairs(esp) do dropESP(m) end
    for obj in pairs(hl) do killHL(obj) end
    restoreHitboxes()
    if ppHook then pcall(disablePP) end

    if FlowManager and FlowOldStart then FlowManager.startGame = FlowOldStart end

    pcall(function()
        local S = Initializer.CharacterSystems and Initializer.CharacterSystems.Sprinting
        if S then
            S.StaminaLossDisabled = false
            S.IsSprinting = false
            S.CanSprint = true
            S.Stamina = S.MaxStamina
        end
    end)

    pcall(function()
        for _, f in ipairs({ "SpeedMultipliers", "FOVMultipliers" }) do
            local folder = Char and Char:FindFirstChild(f)
            if folder then
                for _, v in ipairs(folder:GetChildren()) do
                    if v.Name:sub(1, 2) == "__" then v:Destroy() end
                end
            end
        end
        if Hum then Hum.WalkSpeed = Hum:GetAttribute("BaseSpeed") or 16 end
    end)

    pcall(function() workspace:SetAttribute("cl_interp", nil) end)
    pcall(function()
        Lighting.Brightness, Lighting.ClockTime = 1, 14
        Lighting.Ambient = Color3.fromRGB(70, 70, 70)
        Lighting.OutdoorAmbient = Color3.fromRGB(70, 70, 70)
    end)
    pcall(function() gui:Destroy() end)

    local toastGui = Instance.new("ScreenGui")
    toastGui.IgnoreGuiInset = true
    toastGui.ResetOnSpawn = false
    toastGui.DisplayOrder = 100
    toastGui.Parent = LP:WaitForChild("PlayerGui")
    local t = inst("TextLabel", {
        Text = "RUSaken unloaded", Font = Enum.Font.GothamMedium, TextSize = 13,
        TextColor3 = Color3.new(1, 1, 1), BackgroundColor3 = Color3.fromRGB(20, 20, 26),
        BackgroundTransparency = 0.1, BorderSizePixel = 0,
        Size = UDim2.fromOffset(170, 30), Position = UDim2.new(0.5, -85, 1, -70),
    }, toastGui)
    corner(t, 8)
    Tween:Create(t, TweenInfo.new(0.6, Enum.EasingStyle.Quad, Enum.EasingDirection.Out,
        0, true, 1.6), { BackgroundTransparency = 1, TextTransparency = 1 }):Play()
    task.delay(2.6, function() toastGui:Destroy() end)
end

unloadBtn.MouseButton1Click:Connect(unload)

if Cfg.InstantPP then enablePP() end

-- открытие
for n, p in pairs(pages) do p.Visible = (n == "Движение") end
for n, b in pairs(tabBtns) do
    b.BackgroundColor3 = n == "Движение" and Color3.fromRGB(34, 34, 46) or Color3.fromRGB(26, 26, 34)
    b.TextColor3 = n == "Движение" and Color3.new(1, 1, 1) or Color3.fromRGB(150, 150, 168)
end
main.Size = UDim2.fromOffset(372, 0)
Tween:Create(main, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out),
    { Size = UDim2.fromOffset(372, 452) }):Play()

minBtn.MouseButton1Click:Connect(function()
    local closed = main.Size.Y.Offset < 100
    Tween:Create(main, TweenInfo.new(0.22, Enum.EasingStyle.Quint),
        { Size = UDim2.fromOffset(372, closed and 452 or 44) }):Play()
end)
closeBtn.MouseButton1Click:Connect(function() main.Visible = false end)
Game pageRusaken · 1 script on this siteRoblox ›

More Rusaken scripts

See all
Get Delta Script first on GoogleAdd us as a preferred source to see our new scripts in your Google results.
Add Delta Script on Google

Leave a Reply

Your email address will not be published. Required fields are marked *