Roblox dzielnica Script (November 2026)

PUBLISHEDUPDATED
1 Available ScriptFree

Most players get tired of the slow grind pretty fast, so running a dzielnica script changes the whole vibe. You stop worrying about wasting time and just get straight to the action. It keeps things fun when you want to mess around without the usual hassle.

The game drops you into city quarters and administrative zones based on local Polish systems. You spend your time exploring these areas and mastering the combat system. Timing your blocks lets you deflect pretty much anything coming your way, from arrows to dropkicks, while grabbing stamina bonuses.

If you want to try out the latest tool, we grabbed the working paste for you below. Just copy it over and load it up in your executor to get started right away.

dzielnica Script – programnoe abezpichenie (vibecode) & More

programnoe abezpichenie (vibecode) & MoreFree
programnoe abezpichenie (vibecode)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local bricksFolder = Workspace:WaitForChild("obby"):WaitForChild("bricks")
local camera = Workspace.CurrentCamera

-- === СИСТЕМА КЛЮЧА ===
local SECRET_KEY = "growedddd"
local keyUnlocked = false
local snakeScore = 0
local SNAKE_TARGET = 10
local keyGui
local menuBuilt = false

-- === СИСТЕМА ОПРЕДЕЛЕНИЯ ENIGMA ===
local myTag = player:FindFirstChild("IsEnigmaUser")
if not myTag then
    myTag = Instance.new("BoolValue")
    myTag.Name = "IsEnigmaUser"
    myTag.Value = true
    myTag.Parent = player
end
local enigmaTags = {}

-- === НАСТРОЙКИ БЛОКА (Ragdoll) ===
local blockColor = Color3.fromRGB(170, 0, 170)
local blockHeight = -3
local blockTime = 1
local maxSpeed = 1000

-- === НАСТРОЙКИ КАМЕРЫ ===
local yaw, pitch = 0, -0.15
local distance = 12
local isRagdollFeatureEnabled = false

-- === НАСТРОЙКИ БОТА ===
local isBotEnabled = false
local botConnection = nil
local botMoveConnection = nil
local botLookConnection = nil

-- === НАСТРОЙКИ RAGE TP ===
local rageTPEnabled = false
local rageTPTarget = nil
local rageTPBind = Enum.KeyCode.F
local rageTPDistance = 3
local rageTPOriginalPos = nil
local isListeningRageTP = false
local rageTPConnection = nil
local rageTPMarker = nil

-- === НАСТРОЙКИ AIMBOT ===
local aimbotEnabled = false
local aimbotTarget = nil
local aimbotBind = Enum.KeyCode.Q
local aimbotSmooth = 0.5
local isListeningAimbot = false

-- === НАСТРОЙКИ VISUALS ===
local namesEnabled = false
local distEnabled = false
local highlightEnabled = false
local espColor = Color3.fromRGB(255, 50, 50)
local espObjects = {}

-- === НАСТРОЙКИ FULLBRIGHT ===
local fullbrightEnabled = false
local originalLighting = {}

-- === НАСТРОЙКИ ПИЗДЕЦ (ВИЗУАЛЬНЫЙ ХАОС) ===
local pizdecEnabled = false
local pizdecConnection = nil
local pizdecEffects = {}
local pizdecOriginalCamera = nil

-- === НАСТРОЙКИ WASTED (GTA-ЭФФЕКТ ПРИ СМЕРТИ) ===
local wastedEnabled = false
local wastedGui = nil
local wastedLabel = nil
local wastedLine = nil
local wastedColorEffect = nil
local wastedBlurEffect = nil
local wastedConnection = nil
local wastedActive = false

local espGui = Instance.new("ScreenGui")
espGui.Name = "VisualsESP"
espGui.ResetOnSpawn = false
espGui.Parent = playerGui

-- === НАСТРОЙКИ AUTOPARRY ===
local MAX_DISTANCE = 11.1
local TIMING = { default = 0.32, dropkick = 0.50, windup = 0.4 }
local STATES = {
	["1swing"] = true, ["-1swing"] = true, ["1windupswing"] = true,
	["-1windupswing"] = true, ["kicking"] = true, ["dropkicking"] = true, ["throwdo"] = true,
}
local parryEnabled = false
local parryHolding = false
local parryToken = 0
local lastState = {}

-- === ЯЗЫК ===
local currentLang = "ru"
local texts = {
    ru = {
        title = "програмное обеспичение",
        tabs = {"Combat", "Rage", "Damage", "Movement", "Misc", "Visuals", "Funs", "Settings"},
        parry = "AutoParry",
        aimbot = "Аимбот (Toggle)",
        bind = "Бинд",
        noBind = "[-] Нет бинда",
        smooth = "Плавность: ",
        rageTP = "Rage TP (За спину)",
        distance = "Дистанция: ",
        spawnRed = "SPAWN RED PART",
        speed = "Толчок: ",
        ragdoll = "Рагдолл",
        noclip = "Noclip (сквозь стены)",
        freeCam = "Свободная камера",
        speedometer = "Спидометр",
        fullbright = "Fullbright (Свет)",
        rainbow = "Радужное меню",
        names = "Ники игроков",
        dist = "Дистанция до игроков",
        highlight = "Подсветка тела",
        espColor = "Цвет визуалов",
        bot = "Бот (сам по себе)",
        pizdec = "ПИЗДЕЦ (Визуальный хаос)",
        wasted = "WASTED при смерти (GTA)",
        lang = "Язык / Language",
        ruBtn = "Русский",
        engBtn = "English"
    },
    eng = {
        title = "програмное обеспичение",
        tabs = {"Combat", "Rage", "Damage", "Movement", "Misc", "Visuals", "Funs", "Settings"},
        parry = "AutoParry",
        aimbot = "Aimbot (Toggle)",
        bind = "Bind",
        noBind = "[-] No bind",
        smooth = "Smoothness: ",
        rageTP = "Rage TP (Behind)",
        distance = "Distance: ",
        spawnRed = "SPAWN RED PART",
        speed = "Speed: ",
        ragdoll = "Ragdoll",
        noclip = "Noclip (through walls)",
        freeCam = "Free Camera",
        speedometer = "Speedometer",
        fullbright = "Fullbright",
        rainbow = "Rainbow Menu",
        names = "Player Names",
        dist = "Player Distance",
        highlight = "Body Highlight",
        espColor = "Visual Color",
        bot = "Bot (Auto)",
        pizdec = "PIZDEC (Visual Chaos)",
        wasted = "WASTED on death (GTA)",
        lang = "Language / Язык",
        ruBtn = "Русский",
        engBtn = "English"
    }
}

-- === ЦВЕТА И РАДУГА ===
local rainbowEnabled = false
local menuAccentColor = Color3.fromRGB(0, 170, 255)

-- === ШРИФТ ===
local UI_FONT = Enum.Font.GothamBlack

local function isRagdolled(value) return value == true or value == 1 end
local function resetTransparency(character)
    for _, part in ipairs(character:GetDescendants()) do
        if part:IsA("BasePart") or part:IsA("Decal") then
            part.LocalTransparencyModifier = 0
        end
    end
end

-- =========================================================
-- === СИСТЕМА КЛЮЧА: ЗМЕЙКА + КЛЮЧ + ВВОД ===
-- =========================================================

local function copyToClipboard(text)
    if setclipboard then
        pcall(function() setclipboard(text) end)
    elseif toclipboard then
        pcall(function() toclipboard(text) end)
    end
end

-- Функция запуска змейки
local function startSnakeGame()
    if keyGui then keyGui:Destroy() end

    keyGui = Instance.new("ScreenGui")
    keyGui.Name = "KeySystemGui"
    keyGui.ResetOnSpawn = false
    keyGui.IgnoreGuiInset = true
    keyGui.DisplayOrder = 9999
    keyGui.Parent = playerGui

    local bg = Instance.new("Frame")
    bg.Size = UDim2.new(0, 460, 0, 560)
    bg.Position = UDim2.new(0.5, -230, 0.5, -280)
    bg.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
    bg.BorderSizePixel = 0
    bg.Parent = keyGui
    Instance.new("UICorner", bg).CornerRadius = UDim.new(0, 12)
    local bgStroke = Instance.new("UIStroke", bg)
    bgStroke.Color = Color3.fromRGB(0, 170, 255)
    bgStroke.Thickness = 2

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 40)
    title.Position = UDim2.new(0, 0, 0, 10)
    title.BackgroundTransparency = 1
    title.Text = "?? KEY SYSTEM — ЗМЕЙКА"
    title.TextColor3 = Color3.fromRGB(0, 170, 255)
    title.Font = UI_FONT
    title.TextSize = 20
    title.Parent = bg

    local scoreLabel = Instance.new("TextLabel")
    scoreLabel.Size = UDim2.new(1, 0, 0, 25)
    scoreLabel.Position = UDim2.new(0, 0, 0, 50)
    scoreLabel.BackgroundTransparency = 1
    scoreLabel.Text = "Счёт: 0 / " .. SNAKE_TARGET
    scoreLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    scoreLabel.Font = UI_FONT
    scoreLabel.TextSize = 16
    scoreLabel.Parent = bg

    local GRID = 20
    local CELL = 20
    local FIELD = GRID * CELL

    local field = Instance.new("Frame")
    field.Size = UDim2.new(0, FIELD, 0, FIELD)
    field.Position = UDim2.new(0.5, -FIELD/2, 0, 90)
    field.BackgroundColor3 = Color3.fromRGB(5, 5, 10)
    field.BorderSizePixel = 0
    field.Parent = bg
    Instance.new("UICorner", field).CornerRadius = UDim.new(0, 6)
    local fieldStroke = Instance.new("UIStroke", field)
    fieldStroke.Color = Color3.fromRGB(50, 50, 60)

    local snakeContainer = Instance.new("Frame")
    snakeContainer.Size = UDim2.new(1, 0, 1, 0)
    snakeContainer.BackgroundTransparency = 1
    snakeContainer.ClipsDescendants = true
    snakeContainer.Parent = field

    local hint = Instance.new("TextLabel")
    hint.Size = UDim2.new(1, 0, 0, 20)
    hint.Position = UDim2.new(0, 0, 0, 500)
    hint.BackgroundTransparency = 1
    hint.Text = "Управление: WASD / Стрелки"
    hint.TextColor3 = Color3.fromRGB(150, 150, 150)
    hint.Font = UI_FONT
    hint.TextSize = 12
    hint.Parent = bg

    local haveKeyBtn = Instance.new("TextButton")
    haveKeyBtn.Size = UDim2.new(1, -60, 0, 38)
    haveKeyBtn.Position = UDim2.new(0, 30, 0, 510)
    haveKeyBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
    haveKeyBtn.Text = "?? У МЕНЯ УЖЕ ЕСТЬ КЛЮЧ"
    haveKeyBtn.TextColor3 = Color3.fromRGB(0, 170, 255)
    haveKeyBtn.Font = UI_FONT
    haveKeyBtn.TextSize = 13
    haveKeyBtn.Parent = bg
    Instance.new("UICorner", haveKeyBtn).CornerRadius = UDim.new(0, 8)
    local hkStroke = Instance.new("UIStroke", haveKeyBtn)
    hkStroke.Color = Color3.fromRGB(0, 170, 255)
    hkStroke.Thickness = 1

    local snake = {{x = 10, y = 10}}
    local dir = {x = 1, y = 0}
    local nextDir = {x = 1, y = 0}
    local food = {x = 15, y = 10}
    local score = 0
    local alive = true
    local moveAccum = 0
    local MOVE_INTERVAL = 0.15

    local segments = {}
    local foodFrame

    local function clearSegments()
        for _, s in ipairs(segments) do s:Destroy() end
        segments = {}
        if foodFrame then foodFrame:Destroy() foodFrame = nil end
    end

    local function spawnFood()
        while true do
            local fx = math.random(1, GRID)
            local fy = math.random(1, GRID)
            local conflict = false
            for _, s in ipairs(snake) do
                if s.x == fx and s.y == fy then conflict = true break end
            end
            if not conflict then
                food = {x = fx, y = fy}
                break
            end
        end
        if foodFrame then foodFrame:Destroy() end
        foodFrame = Instance.new("Frame")
        foodFrame.Size = UDim2.new(0, CELL-2, 0, CELL-2)
        foodFrame.Position = UDim2.new(0, (food.x-1)*CELL+1, 0, (food.y-1)*CELL+1)
        foodFrame.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
        foodFrame.BorderSizePixel = 0
        foodFrame.Parent = snakeContainer
        Instance.new("UICorner", foodFrame).CornerRadius = UDim.new(1, 0)
    end

    local function render()
        for _, s in ipairs(segments) do s:Destroy() end
        segments = {}
        for i, s in ipairs(snake) do
            local seg = Instance.new("Frame")
            seg.Size = UDim2.new(0, CELL-2, 0, CELL-2)
            seg.Position = UDim2.new(0, (s.x-1)*CELL+1, 0, (s.y-1)*CELL+1)
            seg.BackgroundColor3 = (i == 1) and Color3.fromRGB(0, 255, 100) or Color3.fromRGB(0, 200, 80)
            seg.BorderSizePixel = 0
            seg.Parent = snakeContainer
            Instance.new("UICorner", seg).CornerRadius = UDim.new(0, 3)
            table.insert(segments, seg)
        end
    end

    local function updateScore()
        scoreLabel.Text = "Счёт: " .. score .. " / " .. SNAKE_TARGET
    end

    local function gameOver()
        alive = false
        clearSegments()
        title.Text = "?? GAME OVER"
        title.TextColor3 = Color3.fromRGB(255, 50, 50)
        task.wait(1.5)
        startSnakeGame()
    end

    local function winGame()
        alive = false
        clearSegments()
        title.Text = "? ПОБЕДА!"
        title.TextColor3 = Color3.fromRGB(50, 255, 50)
        task.wait(1)
        showKeyReveal()
    end

    local function step()
        if not alive then return end
        dir = nextDir
        local head = {x = snake[1].x + dir.x, y = snake[1].y + dir.y}

        if head.x < 1 or head.x > GRID or head.y < 1 or head.y > GRID then
            gameOver() return
        end
        for _, s in ipairs(snake) do
            if s.x == head.x and s.y == head.y then
                gameOver() return
            end
        end

        table.insert(snake, 1, head)

        if head.x == food.x and head.y == food.y then
            score = score + 1
            snakeScore = score
            updateScore()
            if score >= SNAKE_TARGET then
                render()
                winGame() return
            end
            spawnFood()
        else
            table.remove(snake)
        end
        render()
    end

    render()
    spawnFood()

    local conn
    conn = RunService.Heartbeat:Connect(function(dt)
        if not alive then conn:Disconnect() return end
        if not keyGui or not keyGui.Parent then conn:Disconnect() return end
        moveAccum = moveAccum + dt
        if moveAccum >= MOVE_INTERVAL then
            moveAccum = moveAccum - MOVE_INTERVAL
            step()
        end
    end)

    local inputConn
    inputConn = UserInputService.InputBegan:Connect(function(input, gp)
        if not alive then return end
        if gp then return end
        local k = input.KeyCode
        if k == Enum.KeyCode.W or k == Enum.KeyCode.Up then
            if dir.y ~= 1 then nextDir = {x=0,y=-1} end
        elseif k == Enum.KeyCode.S or k == Enum.KeyCode.Down then
            if dir.y ~= -1 then nextDir = {x=0,y=1} end
        elseif k == Enum.KeyCode.A or k == Enum.KeyCode.Left then
            if dir.x ~= 1 then nextDir = {x=-1,y=0} end
        elseif k == Enum.KeyCode.D or k == Enum.KeyCode.Right then
            if dir.x ~= -1 then nextDir = {x=1,y=0} end
        end
    end)

    haveKeyBtn.MouseButton1Click:Connect(function()
        alive = false
        if conn then conn:Disconnect() end
        if inputConn then inputConn:Disconnect() end
        if keyGui then keyGui:Destroy() end
        keyGui = nil
        showKeyInput()
    end)

    keyGui.AncestryChanged:Connect(function()
        if not keyGui.Parent then
            if conn then conn:Disconnect() end
            if inputConn then inputConn:Disconnect() end
        end
    end)
end

-- === ОКНО ВВОДА КЛЮЧА (без змейки) ===
function showKeyInput()
    if keyGui then keyGui:Destroy() end
    keyGui = Instance.new("ScreenGui")
    keyGui.Name = "KeySystemGui"
    keyGui.ResetOnSpawn = false
    keyGui.IgnoreGuiInset = true
    keyGui.DisplayOrder = 9999
    keyGui.Parent = playerGui

    local bg = Instance.new("Frame")
    bg.Size = UDim2.new(0, 420, 0, 260)
    bg.Position = UDim2.new(0.5, -210, 0.5, -130)
    bg.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
    bg.BorderSizePixel = 0
    bg.Parent = keyGui
    Instance.new("UICorner", bg).CornerRadius = UDim.new(0, 12)
    local bgStroke = Instance.new("UIStroke", bg)
    bgStroke.Color = Color3.fromRGB(0, 170, 255)
    bgStroke.Thickness = 2

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 40)
    title.Position = UDim2.new(0, 0, 0, 15)
    title.BackgroundTransparency = 1
    title.Text = "?? ВВОД КЛЮЧА"
    title.TextColor3 = Color3.fromRGB(0, 170, 255)
    title.Font = UI_FONT
    title.TextSize = 22
    title.Parent = bg

    local sub = Instance.new("TextLabel")
    sub.Size = UDim2.new(1, 0, 0, 20)
    sub.Position = UDim2.new(0, 0, 0, 55)
    sub.BackgroundTransparency = 1
    sub.Text = "Введите ключ для активации скрипта:"
    sub.TextColor3 = Color3.fromRGB(200, 200, 200)
    sub.Font = UI_FONT
    sub.TextSize = 13
    sub.Parent = bg

    local inputBox = Instance.new("TextBox")
    inputBox.Size = UDim2.new(1, -60, 0, 45)
    inputBox.Position = UDim2.new(0, 30, 0, 90)
    inputBox.BackgroundColor3 = Color3.fromRGB(5, 5, 10)
    inputBox.BorderSizePixel = 0
    inputBox.Text = ""
    inputBox.PlaceholderText = "Введите ключ..."
    inputBox.TextColor3 = Color3.fromRGB(255, 255, 255)
    inputBox.PlaceholderColor3 = Color3.fromRGB(120, 120, 120)
    inputBox.Font = Enum.Font.Code
    inputBox.TextSize = 16
    inputBox.Parent = bg
    Instance.new("UICorner", inputBox).CornerRadius = UDim.new(0, 8)
    local ibStroke = Instance.new("UIStroke", inputBox)
    ibStroke.Color = Color3.fromRGB(80, 80, 80)

    local submitBtn = Instance.new("TextButton")
    submitBtn.Size = UDim2.new(1, -60, 0, 42)
    submitBtn.Position = UDim2.new(0, 30, 0, 150)
    submitBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
    submitBtn.Text = "?? АКТИВИРОВАТЬ"
    submitBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    submitBtn.Font = UI_FONT
    submitBtn.TextSize = 15
    submitBtn.Parent = bg
    Instance.new("UICorner", submitBtn).CornerRadius = UDim.new(0, 8)

    local backBtn = Instance.new("TextButton")
    backBtn.Size = UDim2.new(1, -60, 0, 30)
    backBtn.Position = UDim2.new(0, 30, 0, 205)
    backBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
    backBtn.Text = "< Назад (найти ключ через змейку)"
    backBtn.TextColor3 = Color3.fromRGB(150, 150, 150)
    backBtn.Font = UI_FONT
    backBtn.TextSize = 11
    backBtn.Parent = bg
    Instance.new("UICorner", backBtn).CornerRadius = UDim.new(0, 8)

    local function trySubmit()
        if inputBox.Text == SECRET_KEY then
            keyUnlocked = true
            submitBtn.Text = "? КЛЮЧ ВЕРНЫЙ!"
            submitBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
            task.wait(0.6)
            keyGui:Destroy()
            keyGui = nil
            if initMenu then initMenu() end
        else
            submitBtn.Text = "? НЕВЕРНЫЙ КЛЮЧ"
            submitBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
            task.wait(1)
            submitBtn.Text = "?? АКТИВИРОВАТЬ"
            submitBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
        end
    end

    submitBtn.MouseButton1Click:Connect(trySubmit)
    inputBox.FocusLost:Connect(function(enterPressed)
        if enterPressed then trySubmit() end
    end)

    backBtn.MouseButton1Click:Connect(function()
        if keyGui then keyGui:Destroy() end
        keyGui = nil
        startSnakeGame()
    end)
end

-- Показ ключа после победы
function showKeyReveal()
    if keyGui then keyGui:Destroy() end
    keyGui = Instance.new("ScreenGui")
    keyGui.Name = "KeySystemGui"
    keyGui.ResetOnSpawn = false
    keyGui.IgnoreGuiInset = true
    keyGui.DisplayOrder = 9999
    keyGui.Parent = playerGui

    local bg = Instance.new("Frame")
    bg.Size = UDim2.new(0, 420, 0, 340)
    bg.Position = UDim2.new(0.5, -210, 0.5, -170)
    bg.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
    bg.BorderSizePixel = 0
    bg.Parent = keyGui
    Instance.new("UICorner", bg).CornerRadius = UDim.new(0, 12)
    local bgStroke = Instance.new("UIStroke", bg)
    bgStroke.Color = Color3.fromRGB(50, 255, 50)
    bgStroke.Thickness = 2

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 40)
    title.Position = UDim2.new(0, 0, 0, 10)
    title.BackgroundTransparency = 1
    title.Text = "?? ВЫ НАШЛИ КЛЮЧ!"
    title.TextColor3 = Color3.fromRGB(50, 255, 50)
    title.Font = UI_FONT
    title.TextSize = 22
    title.Parent = bg

    local sub = Instance.new("TextLabel")
    sub.Size = UDim2.new(1, 0, 0, 20)
    sub.Position = UDim2.new(0, 0, 0, 55)
    sub.BackgroundTransparency = 1
    sub.Text = "Скопируйте его и введите ниже:"
    sub.TextColor3 = Color3.fromRGB(200, 200, 200)
    sub.Font = UI_FONT
    sub.TextSize = 14
    sub.Parent = bg

    local keyBox = Instance.new("Frame")
    keyBox.Size = UDim2.new(1, -60, 0, 50)
    keyBox.Position = UDim2.new(0, 30, 0, 90)
    keyBox.BackgroundColor3 = Color3.fromRGB(5, 5, 10)
    keyBox.BorderSizePixel = 0
    keyBox.Parent = bg
    Instance.new("UICorner", keyBox).CornerRadius = UDim.new(0, 8)
    local kbStroke = Instance.new("UIStroke", keyBox)
    kbStroke.Color = Color3.fromRGB(0, 170, 255)

    local keyLabel = Instance.new("TextLabel")
    keyLabel.Size = UDim2.new(1, -20, 1, 0)
    keyLabel.Position = UDim2.new(0, 10, 0, 0)
    keyLabel.BackgroundTransparency = 1
    keyLabel.Text = SECRET_KEY
    keyLabel.TextColor3 = Color3.fromRGB(0, 255, 255)
    keyLabel.Font = Enum.Font.Code
    keyLabel.TextSize = 22
    keyLabel.TextXAlignment = Enum.TextXAlignment.Left
    keyLabel.Parent = keyBox

    local copyBtn = Instance.new("TextButton")
    copyBtn.Size = UDim2.new(1, -60, 0, 40)
    copyBtn.Position = UDim2.new(0, 30, 0, 155)
    copyBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    copyBtn.Text = "?? СКОПИРОВАТЬ КЛЮЧ"
    copyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    copyBtn.Font = UI_FONT
    copyBtn.TextSize = 14
    copyBtn.Parent = bg
    Instance.new("UICorner", copyBtn).CornerRadius = UDim.new(0, 8)

    copyBtn.MouseButton1Click:Connect(function()
        copyToClipboard(SECRET_KEY)
        copyBtn.Text = "? СКОПИРОВАНО!"
        copyBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
        task.wait(1.2)
        copyBtn.Text = "?? СКОПИРОВАТЬ КЛЮЧ"
        copyBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    end)

    local line = Instance.new("Frame")
    line.Size = UDim2.new(1, -60, 0, 1)
    line.Position = UDim2.new(0, 30, 0, 210)
    line.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
    line.BorderSizePixel = 0
    line.Parent = bg

    local inputBox = Instance.new("TextBox")
    inputBox.Size = UDim2.new(1, -60, 0, 40)
    inputBox.Position = UDim2.new(0, 30, 0, 225)
    inputBox.BackgroundColor3 = Color3.fromRGB(5, 5, 10)
    inputBox.BorderSizePixel = 0
    inputBox.Text = ""
    inputBox.PlaceholderText = "Введите ключ..."
    inputBox.TextColor3 = Color3.fromRGB(255, 255, 255)
    inputBox.PlaceholderColor3 = Color3.fromRGB(120, 120, 120)
    inputBox.Font = Enum.Font.Code
    inputBox.TextSize = 16
    inputBox.Parent = bg
    Instance.new("UICorner", inputBox).CornerRadius = UDim.new(0, 8)
    local ibStroke = Instance.new("UIStroke", inputBox)
    ibStroke.Color = Color3.fromRGB(80, 80, 80)

    local submitBtn = Instance.new("TextButton")
    submitBtn.Size = UDim2.new(1, -60, 0, 40)
    submitBtn.Position = UDim2.new(0, 30, 0, 275)
    submitBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
    submitBtn.Text = "?? АКТИВИРОВАТЬ"
    submitBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    submitBtn.Font = UI_FONT
    submitBtn.TextSize = 15
    submitBtn.Parent = bg
    Instance.new("UICorner", submitBtn).CornerRadius = UDim.new(0, 8)

    submitBtn.MouseButton1Click:Connect(function()
        if inputBox.Text == SECRET_KEY then
            keyUnlocked = true
            submitBtn.Text = "? КЛЮЧ ВЕРНЫЙ!"
            submitBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
            task.wait(0.6)
            keyGui:Destroy()
            keyGui = nil
            if initMenu then initMenu() end
        else
            submitBtn.Text = "? НЕВЕРНЫЙ КЛЮЧ"
            submitBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
            task.wait(1)
            submitBtn.Text = "?? АКТИВИРОВАТЬ"
            submitBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
        end
    end)
end

-- =========================================================
-- === ОСНОВНОЙ СКРИПТ (обёрнут в initMenu) ===
-- =========================================================
function initMenu()
-- Ищем блок для рагдолла (фиолетовый)
local originalBlock = nil
for _, part in pairs(bricksFolder:GetChildren()) do
	if part:IsA("BasePart") and part.Color == blockColor then
		originalBlock = part
		break
	end
end
if not originalBlock then warn("Блок рагдолла не найден!") return end
originalBlock.LocalTransparencyModifier = 1 

-- Ищем КРАСНЫЙ блок для Damage (3-й)
local redPart = nil
local index = 0
for _, part in pairs(bricksFolder:GetChildren()) do
    if part:IsA("BasePart") then
        index = index + 1
        if index == 3 then
            redPart = part
            break
        end
    end
end
if redPart then redPart.LocalTransparencyModifier = 1 else warn("Красный парт не найден") end

local currentKey = Enum.KeyCode.B
local isListening = false
local debounce = false
local currentSpeed = 100
local isSpeedometerEnabled = true

-- === NOCLIP ПЕРЕМЕННЫЕ ===
local noclipEnabled = false
local noclipConnection = nil

local renderConnection
local inputConnection
local ragdolledConnection

-- === СПИДОМЕТР ===
local speedometerGui = Instance.new("ScreenGui")
speedometerGui.Name = "SpeedometerGui"
speedometerGui.ResetOnSpawn = false
speedometerGui.Parent = playerGui

local speedoFrame = Instance.new("Frame")
speedoFrame.Size = UDim2.new(0, 200, 0, 60)
speedoFrame.Position = UDim2.new(0.5, -100, 1, -80)
speedoFrame.BackgroundTransparency = 1
speedoFrame.Parent = speedometerGui

local speedoText = Instance.new("TextLabel")
speedoText.Size = UDim2.new(1, 0, 1, 0)
speedoText.BackgroundTransparency = 1
speedoText.Text = "0 u/s"
speedoText.TextColor3 = Color3.fromRGB(255, 255, 255)
speedoText.Font = UI_FONT
speedoText.TextSize = 36
speedoText.TextXAlignment = Enum.TextXAlignment.Center
speedoText.TextYAlignment = Enum.TextYAlignment.Center
speedoText.Parent = speedoFrame

local textStroke = Instance.new("UIStroke")
textStroke.Color = Color3.fromRGB(0, 0, 0)
textStroke.Thickness = 3
textStroke.Parent = speedoText

local baseSpeedoPos = speedoFrame.Position
local vibrationIntensity = 0

-- === ОКНО МЕНЮ ===
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "enigma_gui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 350, 0, 480) 
mainFrame.Position = UDim2.new(0.5, -175, 0, 50)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = screenGui

local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 8)
uiCorner.Parent = mainFrame

local uiStroke = Instance.new("UIStroke")
uiStroke.Color = Color3.fromRGB(80, 80, 80)
uiStroke.Thickness = 1.5
uiStroke.Parent = mainFrame

-- ЗАГОЛОВОК
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, -30, 0, 25)
titleLabel.Position = UDim2.new(0, 10, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.Text = texts[currentLang].title
titleLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
titleLabel.Font = UI_FONT
titleLabel.TextSize = 14
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.Parent = mainFrame

-- ПОДПИСЬ СНИЗУ
local footerLabel = Instance.new("TextLabel")
footerLabel.Size = UDim2.new(1, 0, 0, 20)
footerLabel.Position = UDim2.new(0, 0, 1, -22)
footerLabel.BackgroundTransparency = 1
footerLabel.Text = "tg: @growedddd"
footerLabel.TextColor3 = Color3.fromRGB(150, 150, 150)
footerLabel.Font = UI_FONT
footerLabel.TextSize = 12
footerLabel.TextXAlignment = Enum.TextXAlignment.Center
footerLabel.Parent = mainFrame

local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(0, 20, 0, 20)
toggleBtn.Position = UDim2.new(1, -25, 0, 3)
toggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
toggleBtn.Text = "Ў"
toggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleBtn.Font = UI_FONT
toggleBtn.TextSize = 12
toggleBtn.Parent = mainFrame
Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 4)

-- === БОКОВАЯ ПАНЕЛЬ ===
local sidebar = Instance.new("Frame")
sidebar.Size = UDim2.new(0, 75, 1, -50)
sidebar.Position = UDim2.new(0, 0, 0, 30)
sidebar.BackgroundTransparency = 1
sidebar.Parent = mainFrame

local function createTab(text, posY)
    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(0, 65, 0, 35)
    btn.Position = UDim2.new(0, 5, 0, posY)
    btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    btn.Text = text
    btn.TextColor3 = Color3.fromRGB(255, 255, 255)
    btn.Font = UI_FONT
    btn.TextSize = 11
    btn.Parent = sidebar
    Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)
    return btn
end

local tabCombat = createTab(texts[currentLang].tabs[1], 5)
local tabRage = createTab(texts[currentLang].tabs[2], 45)
local tabDamage = createTab(texts[currentLang].tabs[3], 85)
local tabMovement = createTab(texts[currentLang].tabs[4], 125)
local tabMisc = createTab(texts[currentLang].tabs[5], 165)
local tabVisuals = createTab(texts[currentLang].tabs[6], 205)
local tabFuns = createTab(texts[currentLang].tabs[7], 245)
local tabSettings = createTab(texts[currentLang].tabs[8], 285)

-- Контейнер для контента
local contentFrame = Instance.new("Frame")
contentFrame.Size = UDim2.new(1, -85, 1, -55)
contentFrame.Position = UDim2.new(0, 80, 0, 30)
contentFrame.BackgroundTransparency = 1
contentFrame.Parent = mainFrame

-- === СТРАНИЦА 1: COMBAT ===
local combatPage = Instance.new("Frame")
combatPage.Size = UDim2.new(1, 0, 1, 0)
combatPage.BackgroundTransparency = 1
combatPage.Parent = contentFrame

local combatTitle = Instance.new("TextLabel")
combatTitle.Size = UDim2.new(1, -60, 0, 20)
combatTitle.Position = UDim2.new(0, 0, 0, 10)
combatTitle.BackgroundTransparency = 1
combatTitle.Text = texts[currentLang].parry
combatTitle.TextColor3 = Color3.fromRGB(200, 200, 200)
combatTitle.Font = UI_FONT
combatTitle.TextSize = 13
combatTitle.TextXAlignment = Enum.TextXAlignment.Left
combatTitle.Parent = combatPage

local parrySwitchBtn = Instance.new("TextButton")
parrySwitchBtn.Size = UDim2.new(0, 40, 0, 20)
parrySwitchBtn.Position = UDim2.new(1, -40, 0, 10)
parrySwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
parrySwitchBtn.Text = ""
parrySwitchBtn.BorderSizePixel = 0
parrySwitchBtn.Parent = combatPage
Instance.new("UICorner", parrySwitchBtn).CornerRadius = UDim.new(1, 0)

local parrySwitchKnob = Instance.new("Frame")
parrySwitchKnob.Size = UDim2.new(0, 16, 0, 16)
parrySwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
parrySwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
parrySwitchKnob.BorderSizePixel = 0
parrySwitchKnob.Parent = parrySwitchBtn
Instance.new("UICorner", parrySwitchKnob).CornerRadius = UDim.new(1, 0)

local aimbotLabel = Instance.new("TextLabel")
aimbotLabel.Size = UDim2.new(1, -60, 0, 20)
aimbotLabel.Position = UDim2.new(0, 0, 0, 45)
aimbotLabel.BackgroundTransparency = 1
aimbotLabel.Text = texts[currentLang].aimbot
aimbotLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
aimbotLabel.Font = UI_FONT
aimbotLabel.TextSize = 13
aimbotLabel.TextXAlignment = Enum.TextXAlignment.Left
aimbotLabel.Parent = combatPage

local aimbotSwitchBtn = Instance.new("TextButton")
aimbotSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
aimbotSwitchBtn.Position = UDim2.new(1, -40, 0, 45)
aimbotSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
aimbotSwitchBtn.Text = ""
aimbotSwitchBtn.BorderSizePixel = 0
aimbotSwitchBtn.Parent = combatPage
Instance.new("UICorner", aimbotSwitchBtn).CornerRadius = UDim.new(1, 0)

local aimbotSwitchKnob = Instance.new("Frame")
aimbotSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
aimbotSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
aimbotSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
aimbotSwitchKnob.BorderSizePixel = 0
aimbotSwitchKnob.Parent = aimbotSwitchBtn
Instance.new("UICorner", aimbotSwitchKnob).CornerRadius = UDim.new(1, 0)

local aimbotBindBtn = Instance.new("TextButton")
aimbotBindBtn.Size = UDim2.new(0, 65, 0, 20)
aimbotBindBtn.Position = UDim2.new(0, 0, 0, 70)
aimbotBindBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
aimbotBindBtn.Text = aimbotBind and ("[" .. aimbotBind.Name .. "] " .. texts[currentLang].bind) or texts[currentLang].noBind
aimbotBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
aimbotBindBtn.Font = UI_FONT
aimbotBindBtn.TextSize = 11
aimbotBindBtn.Parent = combatPage
Instance.new("UICorner", aimbotBindBtn).CornerRadius = UDim.new(0, 6)

local aimbotClearBtn = Instance.new("TextButton")
aimbotClearBtn.Size = UDim2.new(0, 20, 0, 20)
aimbotClearBtn.Position = UDim2.new(0, 70, 0, 70)
aimbotClearBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
aimbotClearBtn.Text = "X"
aimbotClearBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
aimbotClearBtn.Font = UI_FONT
aimbotClearBtn.TextSize = 12
aimbotClearBtn.Parent = combatPage
Instance.new("UICorner", aimbotClearBtn).CornerRadius = UDim.new(0, 6)

local smoothLabel = Instance.new("TextLabel")
smoothLabel.Size = UDim2.new(1, 0, 0, 20)
smoothLabel.Position = UDim2.new(0, 0, 0, 95)
smoothLabel.BackgroundTransparency = 1
smoothLabel.Text = texts[currentLang].smooth .. aimbotSmooth
smoothLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
smoothLabel.Font = UI_FONT
smoothLabel.TextSize = 12
smoothLabel.TextXAlignment = Enum.TextXAlignment.Left
smoothLabel.Parent = combatPage

local smoothSliderBg = Instance.new("Frame")
smoothSliderBg.Size = UDim2.new(1, 0, 0, 10)
smoothSliderBg.Position = UDim2.new(0, 0, 0, 120)
smoothSliderBg.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
smoothSliderBg.BorderSizePixel = 0
smoothSliderBg.Parent = combatPage
Instance.new("UICorner", smoothSliderBg).CornerRadius = UDim.new(0, 5)

local smoothSliderFill = Instance.new("Frame")
smoothSliderFill.Size = UDim2.new(aimbotSmooth, 0, 1, 0)
smoothSliderFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
smoothSliderFill.BorderSizePixel = 0
smoothSliderFill.Parent = smoothSliderBg
Instance.new("UICorner", smoothSliderFill).CornerRadius = UDim.new(0, 5)

local smoothSliderKnob = Instance.new("TextButton")
smoothSliderKnob.Size = UDim2.new(0, 20, 0, 20)
smoothSliderKnob.Position = UDim2.new(aimbotSmooth, -10, 0.5, -10)
smoothSliderKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
smoothSliderKnob.Text = ""
smoothSliderKnob.BorderSizePixel = 0
smoothSliderKnob.Parent = smoothSliderBg
Instance.new("UICorner", smoothSliderKnob).CornerRadius = UDim.new(1, 0)

-- === СТРАНИЦА 2: RAGE ===
local ragePage = Instance.new("Frame")
ragePage.Size = UDim2.new(1, 0, 1, 0)
ragePage.BackgroundTransparency = 1
ragePage.Parent = contentFrame

local rageTPLabel = Instance.new("TextLabel")
rageTPLabel.Size = UDim2.new(1, -120, 0, 20)
rageTPLabel.Position = UDim2.new(0, 0, 0, 10)
rageTPLabel.BackgroundTransparency = 1
rageTPLabel.Text = texts[currentLang].rageTP
rageTPLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
rageTPLabel.Font = UI_FONT
rageTPLabel.TextSize = 13
rageTPLabel.TextXAlignment = Enum.TextXAlignment.Left
rageTPLabel.Parent = ragePage

local rageTPSwitchBtn = Instance.new("TextButton")
rageTPSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
rageTPSwitchBtn.Position = UDim2.new(1, -40, 0, 10)
rageTPSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
rageTPSwitchBtn.Text = ""
rageTPSwitchBtn.BorderSizePixel = 0
rageTPSwitchBtn.Parent = ragePage
Instance.new("UICorner", rageTPSwitchBtn).CornerRadius = UDim.new(1, 0)

local rageTPSwitchKnob = Instance.new("Frame")
rageTPSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
rageTPSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
rageTPSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
rageTPSwitchKnob.BorderSizePixel = 0
rageTPSwitchKnob.Parent = rageTPSwitchBtn
Instance.new("UICorner", rageTPSwitchKnob).CornerRadius = UDim.new(1, 0)

local rageTPBindBtn = Instance.new("TextButton")
rageTPBindBtn.Size = UDim2.new(0, 65, 0, 20)
rageTPBindBtn.Position = UDim2.new(0, 0, 0, 40)
rageTPBindBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
rageTPBindBtn.Text = rageTPBind and ("[" .. rageTPBind.Name .. "] " .. texts[currentLang].bind) or texts[currentLang].noBind
rageTPBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
rageTPBindBtn.Font = UI_FONT
rageTPBindBtn.TextSize = 11
rageTPBindBtn.Parent = ragePage
Instance.new("UICorner", rageTPBindBtn).CornerRadius = UDim.new(0, 6)

local rageTPClearBtn = Instance.new("TextButton")
rageTPClearBtn.Size = UDim2.new(0, 20, 0, 20)
rageTPClearBtn.Position = UDim2.new(0, 70, 0, 40)
rageTPClearBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
rageTPClearBtn.Text = "X"
rageTPClearBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
rageTPClearBtn.Font = UI_FONT
rageTPClearBtn.TextSize = 12
rageTPClearBtn.Parent = ragePage
Instance.new("UICorner", rageTPClearBtn).CornerRadius = UDim.new(0, 6)

local rageTPDistLabel = Instance.new("TextLabel")
rageTPDistLabel.Size = UDim2.new(1, 0, 0, 20)
rageTPDistLabel.Position = UDim2.new(0, 0, 0, 65)
rageTPDistLabel.BackgroundTransparency = 1
rageTPDistLabel.Text = texts[currentLang].distance .. rageTPDistance
rageTPDistLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
rageTPDistLabel.Font = UI_FONT
rageTPDistLabel.TextSize = 12
rageTPDistLabel.TextXAlignment = Enum.TextXAlignment.Left
rageTPDistLabel.Parent = ragePage

local rageTPSliderBg = Instance.new("Frame")
rageTPSliderBg.Size = UDim2.new(1, 0, 0, 10)
rageTPSliderBg.Position = UDim2.new(0, 0, 0, 90)
rageTPSliderBg.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
rageTPSliderBg.BorderSizePixel = 0
rageTPSliderBg.Parent = ragePage
Instance.new("UICorner", rageTPSliderBg).CornerRadius = UDim.new(0, 5)

local rageTPSliderFill = Instance.new("Frame")
rageTPSliderFill.Size = UDim2.new((rageTPDistance - 3) / 7, 0, 1, 0)
rageTPSliderFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
rageTPSliderFill.BorderSizePixel = 0
rageTPSliderFill.Parent = rageTPSliderBg
Instance.new("UICorner", rageTPSliderFill).CornerRadius = UDim.new(0, 5)

local rageTPSliderKnob = Instance.new("TextButton")
rageTPSliderKnob.Size = UDim2.new(0, 20, 0, 20)
rageTPSliderKnob.Position = UDim2.new((rageTPDistance - 3) / 7, -10, 0.5, -10)
rageTPSliderKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
rageTPSliderKnob.Text = ""
rageTPSliderKnob.BorderSizePixel = 0
rageTPSliderKnob.Parent = rageTPSliderBg
Instance.new("UICorner", rageTPSliderKnob).CornerRadius = UDim.new(1, 0)

-- === СТРАНИЦА 3: DAMAGE ===
local damagePage = Instance.new("Frame")
damagePage.Size = UDim2.new(1, 0, 1, 0)
damagePage.BackgroundTransparency = 1
damagePage.Parent = contentFrame

local redBtn = Instance.new("TextButton")
redBtn.Size = UDim2.new(1, -20, 0, 40)
redBtn.Position = UDim2.new(0, 10, 0, 10)
redBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
redBtn.Text = texts[currentLang].spawnRed
redBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
redBtn.Font = UI_FONT
redBtn.TextSize = 14
redBtn.Parent = damagePage
Instance.new("UICorner", redBtn).CornerRadius = UDim.new(0, 6)

-- === СТРАНИЦА 4: MOVEMENT ===
local movementPage = Instance.new("Frame")
movementPage.Size = UDim2.new(1, 0, 1, 0)
movementPage.BackgroundTransparency = 1
movementPage.Parent = contentFrame

local skinImage = Instance.new("ImageLabel")
skinImage.Size = UDim2.new(0, 65, 0, 65)
skinImage.Position = UDim2.new(0, 0, 0, 5)
skinImage.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
skinImage.BorderSizePixel = 0
skinImage.ScaleType = Enum.ScaleType.Fit
skinImage.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. player.UserId .. "&width=150&height=150&format=png"
skinImage.Parent = movementPage
Instance.new("UICorner", skinImage).CornerRadius = UDim.new(0, 6)
local skStr = Instance.new("UIStroke", skinImage); skStr.Color = Color3.fromRGB(80, 80, 80)

local bindButton = Instance.new("TextButton")
bindButton.Size = UDim2.new(1, -100, 0, 35)
bindButton.Position = UDim2.new(0, 70, 0, 5)
bindButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
bindButton.Text = currentKey and ("[" .. currentKey.Name .. "] " .. texts[currentLang].ragdoll) or texts[currentLang].noBind
bindButton.TextColor3 = Color3.fromRGB(255, 255, 255)
bindButton.Font = UI_FONT
bindButton.TextSize = 12
bindButton.Parent = movementPage
Instance.new("UICorner", bindButton).CornerRadius = UDim.new(0, 6)

local clearBindBtn = Instance.new("TextButton")
clearBindBtn.Size = UDim2.new(0, 20, 0, 20)
clearBindBtn.Position = UDim2.new(1, -25, 0, 12)
clearBindBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
clearBindBtn.Text = "X"
clearBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
clearBindBtn.Font = UI_FONT
clearBindBtn.TextSize = 12
clearBindBtn.Parent = movementPage
Instance.new("UICorner", clearBindBtn).CornerRadius = UDim.new(0, 6)

local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(1, 0, 0, 20)
speedLabel.Position = UDim2.new(0, 0, 0, 80)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = texts[currentLang].speed .. currentSpeed
speedLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
speedLabel.Font = UI_FONT
speedLabel.TextSize = 13
speedLabel.TextXAlignment = Enum.TextXAlignment.Left
speedLabel.Parent = movementPage

local sliderBg = Instance.new("Frame")
sliderBg.Size = UDim2.new(1, 0, 0, 10)
sliderBg.Position = UDim2.new(0, 0, 0, 105)
sliderBg.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
sliderBg.BorderSizePixel = 0
sliderBg.Parent = movementPage
Instance.new("UICorner", sliderBg).CornerRadius = UDim.new(0, 5)

local sliderFill = Instance.new("Frame")
sliderFill.Size = UDim2.new(currentSpeed / maxSpeed, 0, 1, 0)
sliderFill.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
sliderFill.BorderSizePixel = 0
sliderFill.Parent = sliderBg
Instance.new("UICorner", sliderFill).CornerRadius = UDim.new(0, 5)

local sliderKnob = Instance.new("TextButton")
sliderKnob.Size = UDim2.new(0, 20, 0, 20)
sliderKnob.Position = UDim2.new(currentSpeed / maxSpeed, -10, 0.5, -10)
sliderKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
sliderKnob.Text = ""
sliderKnob.BorderSizePixel = 0
sliderKnob.Parent = sliderBg
Instance.new("UICorner", sliderKnob).CornerRadius = UDim.new(1, 0)

-- === NOCLIP КНОПКА ===
local noclipLabel = Instance.new("TextLabel")
noclipLabel.Size = UDim2.new(1, -60, 0, 20)
noclipLabel.Position = UDim2.new(0, 0, 0, 140)
noclipLabel.BackgroundTransparency = 1
noclipLabel.Text = texts[currentLang].noclip
noclipLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
noclipLabel.Font = UI_FONT
noclipLabel.TextSize = 13
noclipLabel.TextXAlignment = Enum.TextXAlignment.Left
noclipLabel.Parent = movementPage

local noclipSwitchBtn = Instance.new("TextButton")
noclipSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
noclipSwitchBtn.Position = UDim2.new(1, -40, 0, 140)
noclipSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
noclipSwitchBtn.Text = ""
noclipSwitchBtn.BorderSizePixel = 0
noclipSwitchBtn.Parent = movementPage
Instance.new("UICorner", noclipSwitchBtn).CornerRadius = UDim.new(1, 0)

local noclipSwitchKnob = Instance.new("Frame")
noclipSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
noclipSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
noclipSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
noclipSwitchKnob.BorderSizePixel = 0
noclipSwitchKnob.Parent = noclipSwitchBtn
Instance.new("UICorner", noclipSwitchKnob).CornerRadius = UDim.new(1, 0)

-- === СТРАНИЦА 5: MISC ===
local miscPage = Instance.new("Frame")
miscPage.Size = UDim2.new(1, 0, 1, 0)
miscPage.BackgroundTransparency = 1
miscPage.Parent = contentFrame

local switchLabel = Instance.new("TextLabel")
switchLabel.Size = UDim2.new(1, -60, 0, 20)
switchLabel.Position = UDim2.new(0, 0, 0, 10)
switchLabel.BackgroundTransparency = 1
switchLabel.Text = texts[currentLang].freeCam
switchLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
switchLabel.Font = UI_FONT
switchLabel.TextSize = 13
switchLabel.TextXAlignment = Enum.TextXAlignment.Left
switchLabel.Parent = miscPage

local switchBtn = Instance.new("TextButton")
switchBtn.Size = UDim2.new(0, 40, 0, 20)
switchBtn.Position = UDim2.new(1, -40, 0, 10)
switchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
switchBtn.Text = ""
switchBtn.BorderSizePixel = 0
switchBtn.Parent = miscPage
Instance.new("UICorner", switchBtn).CornerRadius = UDim.new(1, 0)

local switchKnob = Instance.new("Frame")
switchKnob.Size = UDim2.new(0, 16, 0, 16)
switchKnob.Position = UDim2.new(0, 2, 0.5, -8)
switchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
switchKnob.BorderSizePixel = 0
switchKnob.Parent = switchBtn
Instance.new("UICorner", switchKnob).CornerRadius = UDim.new(1, 0)

local speedoSwitchLabel = Instance.new("TextLabel")
speedoSwitchLabel.Size = UDim2.new(1, -60, 0, 20)
speedoSwitchLabel.Position = UDim2.new(0, 0, 0, 45)
speedoSwitchLabel.BackgroundTransparency = 1
speedoSwitchLabel.Text = texts[currentLang].speedometer
speedoSwitchLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
speedoSwitchLabel.Font = UI_FONT
speedoSwitchLabel.TextSize = 13
speedoSwitchLabel.TextXAlignment = Enum.TextXAlignment.Left
speedoSwitchLabel.Parent = miscPage

local speedoSwitchBtn = Instance.new("TextButton")
speedoSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
speedoSwitchBtn.Position = UDim2.new(1, -40, 0, 45)
speedoSwitchBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
speedoSwitchBtn.Text = ""
speedoSwitchBtn.BorderSizePixel = 0
speedoSwitchBtn.Parent = miscPage
Instance.new("UICorner", speedoSwitchBtn).CornerRadius = UDim.new(1, 0)

local speedoSwitchKnob = Instance.new("Frame")
speedoSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
speedoSwitchKnob.Position = UDim2.new(1, -18, 0.5, -8)
speedoSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
speedoSwitchKnob.BorderSizePixel = 0
speedoSwitchKnob.Parent = speedoSwitchBtn
Instance.new("UICorner", speedoSwitchKnob).CornerRadius = UDim.new(1, 0)

local fbLabel = Instance.new("TextLabel")
fbLabel.Size = UDim2.new(1, -60, 0, 20)
fbLabel.Position = UDim2.new(0, 0, 0, 80)
fbLabel.BackgroundTransparency = 1
fbLabel.Text = texts[currentLang].fullbright
fbLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
fbLabel.Font = UI_FONT
fbLabel.TextSize = 13
fbLabel.TextXAlignment = Enum.TextXAlignment.Left
fbLabel.Parent = miscPage

local fbSwitchBtn = Instance.new("TextButton")
fbSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
fbSwitchBtn.Position = UDim2.new(1, -40, 0, 80)
fbSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
fbSwitchBtn.Text = ""
fbSwitchBtn.BorderSizePixel = 0
fbSwitchBtn.Parent = miscPage
Instance.new("UICorner", fbSwitchBtn).CornerRadius = UDim.new(1, 0)

local fbSwitchKnob = Instance.new("Frame")
fbSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
fbSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
fbSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fbSwitchKnob.BorderSizePixel = 0
fbSwitchKnob.Parent = fbSwitchBtn
Instance.new("UICorner", fbSwitchKnob).CornerRadius = UDim.new(1, 0)

local rainbowSwitchLabel = Instance.new("TextLabel")
rainbowSwitchLabel.Size = UDim2.new(1, -60, 0, 20)
rainbowSwitchLabel.Position = UDim2.new(0, 0, 0, 115)
rainbowSwitchLabel.BackgroundTransparency = 1
rainbowSwitchLabel.Text = texts[currentLang].rainbow
rainbowSwitchLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
rainbowSwitchLabel.Font = UI_FONT
rainbowSwitchLabel.TextSize = 13
rainbowSwitchLabel.TextXAlignment = Enum.TextXAlignment.Left
rainbowSwitchLabel.Parent = miscPage

local rainbowSwitchBtn = Instance.new("TextButton")
rainbowSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
rainbowSwitchBtn.Position = UDim2.new(1, -40, 0, 115)
rainbowSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
rainbowSwitchBtn.Text = ""
rainbowSwitchBtn.BorderSizePixel = 0
rainbowSwitchBtn.Parent = miscPage
Instance.new("UICorner", rainbowSwitchBtn).CornerRadius = UDim.new(1, 0)

local rainbowSwitchKnob = Instance.new("Frame")
rainbowSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
rainbowSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
rainbowSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
rainbowSwitchKnob.BorderSizePixel = 0
rainbowSwitchKnob.Parent = rainbowSwitchBtn
Instance.new("UICorner", rainbowSwitchKnob).CornerRadius = UDim.new(1, 0)

local colorFrame = Instance.new("Frame")
colorFrame.Size = UDim2.new(1, 0, 0, 25)
colorFrame.Position = UDim2.new(0, 0, 0, 150)
colorFrame.BackgroundTransparency = 1
colorFrame.Parent = miscPage

local colors = {
    {Color3.fromRGB(0, 170, 255)},
    {Color3.fromRGB(255, 50, 50)},
    {Color3.fromRGB(50, 255, 50)},
    {Color3.fromRGB(255, 255, 50)},
    {Color3.fromRGB(255, 50, 255)},
    {Color3.fromRGB(255, 255, 255)}
}

local colorButtons = {}
local selectedColorIndex = 1

for i, cData in ipairs(colors) do
    local cBtn = Instance.new("TextButton")
    cBtn.Size = UDim2.new(0, 22, 0, 22)
    cBtn.Position = UDim2.new(0, (i-1)*27, 0, 0)
    cBtn.BackgroundColor3 = cData[1]
    cBtn.Text = ""
    cBtn.Parent = colorFrame
    Instance.new("UICorner", cBtn).CornerRadius = UDim.new(1, 0)
    
    local cStroke = Instance.new("UIStroke", cBtn)
    cStroke.Color = Color3.fromRGB(0, 0, 0)
    cStroke.Thickness = 2
    
    table.insert(colorButtons, {btn = cBtn, stroke = cStroke})
    
    cBtn.MouseButton1Click:Connect(function()
        for _, item in ipairs(colorButtons) do
            item.stroke.Color = Color3.fromRGB(0, 0, 0)
        end
        cStroke.Color = Color3.fromRGB(255, 255, 255)
        
        menuAccentColor = cData[1]
        selectedColorIndex = i
        
        if not rainbowEnabled then
            setTab(activeTab)
            if isSpeedometerEnabled then speedoSwitchBtn.BackgroundColor3 = menuAccentColor end
            if isRagdollFeatureEnabled then switchBtn.BackgroundColor3 = menuAccentColor end
            if parryEnabled then parrySwitchBtn.BackgroundColor3 = menuAccentColor end
            if fullbrightEnabled then fbSwitchBtn.BackgroundColor3 = menuAccentColor end
            if aimbotEnabled then aimbotSwitchBtn.BackgroundColor3 = menuAccentColor end
            if rageTPEnabled then rageTPSwitchBtn.BackgroundColor3 = menuAccentColor end
            if isBotEnabled then botSwitchBtn.BackgroundColor3 = menuAccentColor end
            if pizdecEnabled then pizdecSwitchBtn.BackgroundColor3 = menuAccentColor end
            if wastedEnabled then wastedSwitchBtn.BackgroundColor3 = menuAccentColor end
            if noclipEnabled then noclipSwitchBtn.BackgroundColor3 = menuAccentColor end
        end
    end)
end
colorButtons[1].stroke.Color = Color3.fromRGB(255, 255, 255)

-- === СТРАНИЦА 6: VISUALS ===
local visualsPage = Instance.new("Frame")
visualsPage.Size = UDim2.new(1, 0, 1, 0)
visualsPage.BackgroundTransparency = 1
visualsPage.Parent = contentFrame

local namesLabel = Instance.new("TextLabel")
namesLabel.Size = UDim2.new(1, -60, 0, 20)
namesLabel.Position = UDim2.new(0, 0, 0, 10)
namesLabel.BackgroundTransparency = 1
namesLabel.Text = texts[currentLang].names
namesLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
namesLabel.Font = UI_FONT
namesLabel.TextSize = 13
namesLabel.TextXAlignment = Enum.TextXAlignment.Left
namesLabel.Parent = visualsPage

local namesSwitchBtn = Instance.new("TextButton")
namesSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
namesSwitchBtn.Position = UDim2.new(1, -40, 0, 10)
namesSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
namesSwitchBtn.Text = ""
namesSwitchBtn.BorderSizePixel = 0
namesSwitchBtn.Parent = visualsPage
Instance.new("UICorner", namesSwitchBtn).CornerRadius = UDim.new(1, 0)

local namesSwitchKnob = Instance.new("Frame")
namesSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
namesSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
namesSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
namesSwitchKnob.BorderSizePixel = 0
namesSwitchKnob.Parent = namesSwitchBtn
Instance.new("UICorner", namesSwitchKnob).CornerRadius = UDim.new(1, 0)

local distLabel = Instance.new("TextLabel")
distLabel.Size = UDim2.new(1, -60, 0, 20)
distLabel.Position = UDim2.new(0, 0, 0, 45)
distLabel.BackgroundTransparency = 1
distLabel.Text = texts[currentLang].dist
distLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
distLabel.Font = UI_FONT
distLabel.TextSize = 13
distLabel.TextXAlignment = Enum.TextXAlignment.Left
distLabel.Parent = visualsPage

local distSwitchBtn = Instance.new("TextButton")
distSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
distSwitchBtn.Position = UDim2.new(1, -40, 0, 45)
distSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
distSwitchBtn.Text = ""
distSwitchBtn.BorderSizePixel = 0
distSwitchBtn.Parent = visualsPage
Instance.new("UICorner", distSwitchBtn).CornerRadius = UDim.new(1, 0)

local distSwitchKnob = Instance.new("Frame")
distSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
distSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
distSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
distSwitchKnob.BorderSizePixel = 0
distSwitchKnob.Parent = distSwitchBtn
Instance.new("UICorner", distSwitchKnob).CornerRadius = UDim.new(1, 0)

local hlLabel = Instance.new("TextLabel")
hlLabel.Size = UDim2.new(1, -60, 0, 20)
hlLabel.Position = UDim2.new(0, 0, 0, 80)
hlLabel.BackgroundTransparency = 1
hlLabel.Text = texts[currentLang].highlight
hlLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
hlLabel.Font = UI_FONT
hlLabel.TextSize = 13
hlLabel.TextXAlignment = Enum.TextXAlignment.Left
hlLabel.Parent = visualsPage

local hlSwitchBtn = Instance.new("TextButton")
hlSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
hlSwitchBtn.Position = UDim2.new(1, -40, 0, 80)
hlSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
hlSwitchBtn.Text = ""
hlSwitchBtn.BorderSizePixel = 0
hlSwitchBtn.Parent = visualsPage
Instance.new("UICorner", hlSwitchBtn).CornerRadius = UDim.new(1, 0)

local hlSwitchKnob = Instance.new("Frame")
hlSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
hlSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
hlSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
hlSwitchKnob.BorderSizePixel = 0
hlSwitchKnob.Parent = hlSwitchBtn
Instance.new("UICorner", hlSwitchKnob).CornerRadius = UDim.new(1, 0)

local espColorTitle = Instance.new("TextLabel")
espColorTitle.Size = UDim2.new(1, 0, 0, 20)
espColorTitle.Position = UDim2.new(0, 0, 0, 115)
espColorTitle.BackgroundTransparency = 1
espColorTitle.Text = texts[currentLang].espColor
espColorTitle.TextColor3 = Color3.fromRGB(200, 200, 200)
espColorTitle.Font = UI_FONT
espColorTitle.TextSize = 13
espColorTitle.TextXAlignment = Enum.TextXAlignment.Left
espColorTitle.Parent = visualsPage

local espColorFrame = Instance.new("Frame")
espColorFrame.Size = UDim2.new(1, 0, 0, 25)
espColorFrame.Position = UDim2.new(0, 0, 0, 140)
espColorFrame.BackgroundTransparency = 1
espColorFrame.Parent = visualsPage

local espColors = {
    {Color3.fromRGB(255, 50, 50)},
    {Color3.fromRGB(50, 255, 50)},
    {Color3.fromRGB(50, 150, 255)},
    {Color3.fromRGB(255, 255, 50)},
    {Color3.fromRGB(255, 50, 255)},
    {Color3.fromRGB(255, 255, 255)}
}

local espColorButtons = {}

for i, cData in ipairs(espColors) do
    local cBtn = Instance.new("TextButton")
    cBtn.Size = UDim2.new(0, 22, 0, 22)
    cBtn.Position = UDim2.new(0, (i-1)*27, 0, 0)
    cBtn.BackgroundColor3 = cData[1]
    cBtn.Text = ""
    cBtn.Parent = espColorFrame
    Instance.new("UICorner", cBtn).CornerRadius = UDim.new(1, 0)
    
    local cStroke = Instance.new("UIStroke", cBtn)
    cStroke.Color = Color3.fromRGB(0, 0, 0)
    cStroke.Thickness = 2
    
    table.insert(espColorButtons, {btn = cBtn, stroke = cStroke})
    
    cBtn.MouseButton1Click:Connect(function()
        for _, item in ipairs(espColorButtons) do
            item.stroke.Color = Color3.fromRGB(0, 0, 0)
        end
        cStroke.Color = Color3.fromRGB(255, 255, 255)
        espColor = cData[1]
        
        for p, objs in pairs(espObjects) do
            if objs.highlight then objs.highlight.FillColor = espColor end
            if objs.name then objs.name.TextColor3 = espColor end
            if objs.dist then objs.dist.TextColor3 = espColor end
        end
    end)
end
espColorButtons[1].stroke.Color = Color3.fromRGB(255, 255, 255)

-- === СТРАНИЦА 7: FUNS ===
local funsPage = Instance.new("Frame")
funsPage.Size = UDim2.new(1, 0, 1, 0)
funsPage.BackgroundTransparency = 1
funsPage.Parent = contentFrame

local botLabel = Instance.new("TextLabel")
botLabel.Size = UDim2.new(1, -60, 0, 20)
botLabel.Position = UDim2.new(0, 0, 0, 10)
botLabel.BackgroundTransparency = 1
botLabel.Text = texts[currentLang].bot
botLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
botLabel.Font = UI_FONT
botLabel.TextSize = 13
botLabel.TextXAlignment = Enum.TextXAlignment.Left
botLabel.Parent = funsPage

local botSwitchBtn = Instance.new("TextButton")
botSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
botSwitchBtn.Position = UDim2.new(1, -40, 0, 10)
botSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
botSwitchBtn.Text = ""
botSwitchBtn.BorderSizePixel = 0
botSwitchBtn.Parent = funsPage
Instance.new("UICorner", botSwitchBtn).CornerRadius = UDim.new(1, 0)

local botSwitchKnob = Instance.new("Frame")
botSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
botSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
botSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
botSwitchKnob.BorderSizePixel = 0
botSwitchKnob.Parent = botSwitchBtn
Instance.new("UICorner", botSwitchKnob).CornerRadius = UDim.new(1, 0)

-- === ПИЗДЕЦ (ВИЗУАЛЬНЫЙ ХАОС) КНОПКА ===
local pizdecLabel = Instance.new("TextLabel")
pizdecLabel.Size = UDim2.new(1, -60, 0, 20)
pizdecLabel.Position = UDim2.new(0, 0, 0, 45)
pizdecLabel.BackgroundTransparency = 1
pizdecLabel.Text = texts[currentLang].pizdec
pizdecLabel.TextColor3 = Color3.fromRGB(255, 100, 100)
pizdecLabel.Font = UI_FONT
pizdecLabel.TextSize = 13
pizdecLabel.TextXAlignment = Enum.TextXAlignment.Left
pizdecLabel.Parent = funsPage

local pizdecSwitchBtn = Instance.new("TextButton")
pizdecSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
pizdecSwitchBtn.Position = UDim2.new(1, -40, 0, 45)
pizdecSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
pizdecSwitchBtn.Text = ""
pizdecSwitchBtn.BorderSizePixel = 0
pizdecSwitchBtn.Parent = funsPage
Instance.new("UICorner", pizdecSwitchBtn).CornerRadius = UDim.new(1, 0)

local pizdecSwitchKnob = Instance.new("Frame")
pizdecSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
pizdecSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
pizdecSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
pizdecSwitchKnob.BorderSizePixel = 0
pizdecSwitchKnob.Parent = pizdecSwitchBtn
Instance.new("UICorner", pizdecSwitchKnob).CornerRadius = UDim.new(1, 0)

-- === WASTED КНОПКА ===
local wastedLabelToggle = Instance.new("TextLabel")
wastedLabelToggle.Size = UDim2.new(1, -60, 0, 20)
wastedLabelToggle.Position = UDim2.new(0, 0, 0, 80)
wastedLabelToggle.BackgroundTransparency = 1
wastedLabelToggle.Text = texts[currentLang].wasted
wastedLabelToggle.TextColor3 = Color3.fromRGB(255, 200, 100)
wastedLabelToggle.Font = UI_FONT
wastedLabelToggle.TextSize = 13
wastedLabelToggle.TextXAlignment = Enum.TextXAlignment.Left
wastedLabelToggle.Parent = funsPage

local wastedSwitchBtn = Instance.new("TextButton")
wastedSwitchBtn.Size = UDim2.new(0, 40, 0, 20)
wastedSwitchBtn.Position = UDim2.new(1, -40, 0, 80)
wastedSwitchBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
wastedSwitchBtn.Text = ""
wastedSwitchBtn.BorderSizePixel = 0
wastedSwitchBtn.Parent = funsPage
Instance.new("UICorner", wastedSwitchBtn).CornerRadius = UDim.new(1, 0)

local wastedSwitchKnob = Instance.new("Frame")
wastedSwitchKnob.Size = UDim2.new(0, 16, 0, 16)
wastedSwitchKnob.Position = UDim2.new(0, 2, 0.5, -8)
wastedSwitchKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
wastedSwitchKnob.BorderSizePixel = 0
wastedSwitchKnob.Parent = wastedSwitchBtn
Instance.new("UICorner", wastedSwitchKnob).CornerRadius = UDim.new(1, 0)

-- === СТРАНИЦА 8: SETTINGS ===
local settingsPage = Instance.new("Frame")
settingsPage.Size = UDim2.new(1, 0, 1, 0)
settingsPage.BackgroundTransparency = 1
settingsPage.Parent = contentFrame

local langLabel = Instance.new("TextLabel")
langLabel.Size = UDim2.new(1, 0, 0, 20)
langLabel.Position = UDim2.new(0, 0, 0, 10)
langLabel.BackgroundTransparency = 1
langLabel.Text = texts[currentLang].lang
langLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
langLabel.Font = UI_FONT
langLabel.TextSize = 13
langLabel.TextXAlignment = Enum.TextXAlignment.Left
langLabel.Parent = settingsPage

local ruBtn = Instance.new("TextButton")
ruBtn.Size = UDim2.new(0, 100, 0, 30)
ruBtn.Position = UDim2.new(0, 0, 0, 40)
ruBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
ruBtn.Text = texts[currentLang].ruBtn
ruBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ruBtn.Font = UI_FONT
ruBtn.TextSize = 12
ruBtn.Parent = settingsPage
Instance.new("UICorner", ruBtn).CornerRadius = UDim.new(0, 6)

local engBtn = Instance.new("TextButton")
engBtn.Size = UDim2.new(0, 100, 0, 30)
engBtn.Position = UDim2.new(0, 110, 0, 40)
engBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
engBtn.Text = texts[currentLang].engBtn
engBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
engBtn.Font = UI_FONT
engBtn.TextSize = 12
engBtn.Parent = settingsPage
Instance.new("UICorner", engBtn).CornerRadius = UDim.new(0, 6)

-- Функция обновления языка
local function updateLanguage()
    local t = texts[currentLang]
    titleLabel.Text = t.title
    
    tabCombat.Text = t.tabs[1]
    tabRage.Text = t.tabs[2]
    tabDamage.Text = t.tabs[3]
    tabMovement.Text = t.tabs[4]
    tabMisc.Text = t.tabs[5]
    tabVisuals.Text = t.tabs[6]
    tabFuns.Text = t.tabs[7]
    tabSettings.Text = t.tabs[8]
    
    combatTitle.Text = t.parry
    aimbotLabel.Text = t.aimbot
    aimbotBindBtn.Text = aimbotBind and ("[" .. aimbotBind.Name .. "] " .. t.bind) or t.noBind
    smoothLabel.Text = t.smooth .. string.format("%.2f", aimbotSmooth)
    
    rageTPLabel.Text = t.rageTP
    rageTPBindBtn.Text = rageTPBind and ("[" .. rageTPBind.Name .. "] " .. t.bind) or t.noBind
    rageTPDistLabel.Text = t.distance .. string.format("%.1f", rageTPDistance)
    
    redBtn.Text = t.spawnRed
    
    bindButton.Text = currentKey and ("[" .. currentKey.Name .. "] " .. t.ragdoll) or t.noBind
    speedLabel.Text = t.speed .. currentSpeed
    noclipLabel.Text = t.noclip
    
    switchLabel.Text = t.freeCam
    speedoSwitchLabel.Text = t.speedometer
    fbLabel.Text = t.fullbright
    rainbowSwitchLabel.Text = t.rainbow
    
    namesLabel.Text = t.names
    distLabel.Text = t.dist
    hlLabel.Text = t.highlight
    espColorTitle.Text = t.espColor
    
    botLabel.Text = t.bot
    pizdecLabel.Text = t.pizdec
    wastedLabelToggle.Text = t.wasted
    
    langLabel.Text = t.lang
    ruBtn.Text = t.ruBtn
    engBtn.Text = t.engBtn
end

ruBtn.MouseButton1Click:Connect(function()
    currentLang = "ru"
    updateLanguage()
    ruBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    engBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
end)

engBtn.MouseButton1Click:Connect(function()
    currentLang = "eng"
    updateLanguage()
    engBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    ruBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
end)

if currentLang == "ru" then
    ruBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
else
    engBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
end

-- === NOCLIP ЛОГИКА ===
local function setNoclip(bool)
    if noclipConnection then
        noclipConnection:Disconnect()
        noclipConnection = nil
    end
    noclipEnabled = bool
    if bool then
        noclipConnection = RunService.Stepped:Connect(function()
            local char = player.Character
            if not char then return end
            for _, part in ipairs(char:GetDescendants()) do
                if part:IsA("BasePart") and part.CanCollide then
                    part.CanCollide = false
                end
            end
        end)
    else
        local char = player.Character
        if char then
            for _, part in ipairs(char:GetDescendants()) do
                if part:IsA("BasePart") and not part.CanCollide then
                    part.CanCollide = true
                end
            end
        end
    end
end

noclipSwitchBtn.MouseButton1Click:Connect(function()
    local newState = not noclipEnabled
    setNoclip(newState)
    if newState then
        TweenService:Create(noclipSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(noclipSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(noclipSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(noclipSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
    end
end)

player.CharacterAdded:Connect(function()
    task.wait(0.5)
    if noclipEnabled then
        setNoclip(true)
    end
end)

-- === WASTED (GTA-ЭФФЕКТ ПРИ СМЕРТИ) ЛОГИКА ===
local function hideWasted()
    wastedActive = false
    if wastedGui then
        wastedGui.Enabled = false
    end
    if wastedColorEffect and wastedColorEffect.Parent then
        wastedColorEffect:Destroy()
        wastedColorEffect = nil
    end
    if wastedBlurEffect and wastedBlurEffect.Parent then
        wastedBlurEffect:Destroy()
        wastedBlurEffect = nil
    end
end

local function showWasted()
    if not wastedEnabled then return end
    if wastedActive then return end
    wastedActive = true
    
    if not wastedGui then
        wastedGui = Instance.new("ScreenGui")
        wastedGui.Name = "WastedGui"
        wastedGui.ResetOnSpawn = false
        wastedGui.IgnoreGuiInset = true
        wastedGui.DisplayOrder = 999
        wastedGui.Parent = playerGui
        
        local bg = Instance.new("Frame")
        bg.Name = "WastedBG"
        bg.Size = UDim2.new(1, 0, 1, 0)
        bg.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
        bg.BackgroundTransparency = 1
        bg.BorderSizePixel = 0
        bg.Parent = wastedGui
        
        wastedLabel = Instance.new("TextLabel")
        wastedLabel.Name = "WastedText"
        wastedLabel.Size = UDim2.new(1, 0, 0, 120)
        wastedLabel.Position = UDim2.new(0, 0, 0.5, -60)
        wastedLabel.BackgroundTransparency = 1
        wastedLabel.Text = "WASTED"
        wastedLabel.TextColor3 = Color3.fromRGB(180, 0, 0)
        wastedLabel.Font = Enum.Font.GothamBlack
        wastedLabel.TextSize = 100
        wastedLabel.TextTransparency = 1
        wastedLabel.TextStrokeTransparency = 1
        wastedLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
        wastedLabel.Parent = wastedGui
        
        local stroke = Instance.new("UIStroke")
        stroke.Color = Color3.fromRGB(0, 0, 0)
        stroke.Thickness = 5
        stroke.Transparency = 1
        stroke.Parent = wastedLabel
        wastedLine = stroke
    end
    
    wastedGui.Enabled = true
    
    local bg = wastedGui:FindFirstChild("WastedBG")
    
    wastedLabel.TextTransparency = 1
    wastedLabel.TextStrokeTransparency = 1
    if wastedLine then wastedLine.Transparency = 1 end
    wastedLabel.TextSize = 100
    if bg then bg.BackgroundTransparency = 1 end
    
    wastedColorEffect = Instance.new("ColorCorrectionEffect")
    wastedColorEffect.Name = "WastedColor"
    wastedColorEffect.Saturation = -1
    wastedColorEffect.Contrast = 0.5
    wastedColorEffect.Brightness = -0.1
    wastedColorEffect.Parent = Lighting
    
    wastedBlurEffect = Instance.new("BlurEffect")
    wastedBlurEffect.Name = "WastedBlur"
    wastedBlurEffect.Size = 0
    wastedBlurEffect.Parent = Lighting
    
    TweenService:Create(bg, TweenInfo.new(0.8, Enum.EasingStyle.Quad), {BackgroundTransparency = 0.5}):Play()
    TweenService:Create(wastedBlurEffect, TweenInfo.new(0.8), {Size = 12}):Play()
    
    task.wait(0.3)
    
    TweenService:Create(wastedLabel, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
        TextTransparency = 0,
        TextStrokeTransparency = 0,
        TextSize = 120
    }):Play()
    if wastedLine then
        TweenService:Create(wastedLine, TweenInfo.new(0.6), {Transparency = 0}):Play()
    end
    
    task.spawn(function()
        local pulseTime = 0
        while wastedActive and pulseTime < 3 do
            pulseTime += task.wait(0.05)
            if wastedLabel and wastedLabel.Parent then
                local pulse = (math.sin(pulseTime * 6) + 1) / 2
                wastedLabel.TextColor3 = Color3.fromRGB(150 + pulse * 105, 0, 0)
            end
        end
    end)
    
    task.delay(3, function()
        if wastedActive then
            if wastedLabel then
                TweenService:Create(wastedLabel, TweenInfo.new(0.5), {
                    TextTransparency = 1,
                    TextStrokeTransparency = 1
                }):Play()
            end
            if wastedLine then
                TweenService:Create(wastedLine, TweenInfo.new(0.5), {Transparency = 1}):Play()
            end
            if bg then
                TweenService:Create(bg, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
            end
            if wastedBlurEffect then
                TweenService:Create(wastedBlurEffect, TweenInfo.new(0.5), {Size = 0}):Play()
            end
            task.wait(0.6)
            hideWasted()
        end
    end)
end

local function hookWasted(character)
    if wastedConnection then
        wastedConnection:Disconnect()
        wastedConnection = nil
    end
    
    local stats = player:FindFirstChild("stats")
    if not stats then return end
    local ragdolled = stats:WaitForChild("ragdolled", 5)
    if not ragdolled then return end
    
    local humanoid = character:WaitForChild("Humanoid", 5)
    if humanoid then
        humanoid.Died:Connect(function()
            ragdolled.Value = true
        end)
    end
    
    wastedConnection = ragdolled.Changed:Connect(function(value)
        if isRagdolled(value) then
            showWasted()
        else
            hideWasted()
        end
    end)
    
    if isRagdolled(ragdolled.Value) then
        showWasted()
    end
end

player.CharacterAdded:Connect(function(character)
    task.wait(0.1)
    hideWasted()
    hookWasted(character)
end)

if player.Character then
    hookWasted(player.Character)
end

wastedSwitchBtn.MouseButton1Click:Connect(function()
    wastedEnabled = not wastedEnabled
    if wastedEnabled then
        TweenService:Create(wastedSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255, 200, 100)}):Play()
        TweenService:Create(wastedSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(wastedSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(wastedSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        hideWasted()
    end
end)

-- === ПИЗДЕЦ (ВИЗУАЛЬНЫЙ ХАОС) ЛОГИКА ===
local function clearPizdecEffects()
    if pizdecConnection then pizdecConnection:Disconnect() pizdecConnection = nil end
    for _, effect in pairs(pizdecEffects) do
        if effect and effect.Parent then effect:Destroy() end
    end
    pizdecEffects = {}
    if pizdecOriginalCamera then
        camera.CFrame = pizdecOriginalCamera
        pizdecOriginalCamera = nil
    end
end

local function togglePizdec()
    pizdecEnabled = not pizdecEnabled
    if pizdecEnabled then
        TweenService:Create(pizdecSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255, 50, 50)}):Play()
        TweenService:Create(pizdecSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        
        pizdecOriginalCamera = camera.CFrame
        
        local cc = Instance.new("ColorCorrectionEffect")
        cc.Name = "PizdecColor"
        cc.Brightness = 0
        cc.Contrast = 0.5
        cc.Saturation = 2
        cc.TintColor = Color3.fromRGB(255, 255, 255)
        cc.Parent = Lighting
        pizdecEffects.colorCorrection = cc
        
        local bloom = Instance.new("BloomEffect")
        bloom.Name = "PizdecBloom"
        bloom.Intensity = 2
        bloom.Size = 30
        bloom.Threshold = 0.5
        bloom.Parent = Lighting
        pizdecEffects.bloom = bloom
        
        local blur = Instance.new("BlurEffect")
        blur.Name = "PizdecBlur"
        blur.Size = 5
        blur.Parent = Lighting
        pizdecEffects.blur = blur
        
        local sunRays = Instance.new("SunRaysEffect")
        sunRays.Name = "PizdecSunRays"
        sunRays.Intensity = 0.2
        sunRays.Spread = 1
        sunRays.Parent = Lighting
        pizdecEffects.sunRays = sunRays
        
        local dof = Instance.new("DepthOfFieldEffect")
        dof.Name = "PizdecDOF"
        dof.FarIntensity = 0.5
        dof.FocusDistance = 10
        dof.InFocusRadius = 5
        dof.NearIntensity = 1
        dof.Parent = Lighting
        pizdecEffects.dof = dof
        
        local overlay = Instance.new("Frame")
        overlay.Name = "PizdecOverlay"
        overlay.Size = UDim2.new(1, 0, 1, 0)
        overlay.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
        overlay.BackgroundTransparency = 0.7
        overlay.BorderSizePixel = 0
        overlay.ZIndex = 999
        overlay.Parent = espGui
        
        local overlayGradient = Instance.new("UIGradient")
        overlayGradient.Color = ColorSequence.new{
            ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
            ColorSequenceKeypoint.new(0.25, Color3.fromRGB(0, 255, 0)),
            ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 0, 255)),
            ColorSequenceKeypoint.new(0.75, Color3.fromRGB(255, 255, 0)),
            ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 255))
        }
        overlayGradient.Parent = overlay
        pizdecEffects.overlay = overlay
        
        local huePizdec = 0
        local shakeTime = 0
        
        pizdecConnection = RunService.RenderStepped:Connect(function(deltaTime)
            if not pizdecEnabled then return end
            
            huePizdec = (huePizdec + deltaTime * 1.5) % 1
            shakeTime = shakeTime + deltaTime
            
            if pizdecEffects.colorCorrection then
                local rainbowColor = Color3.fromHSV(huePizdec, 1, 1)
                pizdecEffects.colorCorrection.TintColor = rainbowColor
                pizdecEffects.colorCorrection.Brightness = math.sin(shakeTime * 8) * 0.3
                pizdecEffects.colorCorrection.Contrast = 0.3 + math.sin(shakeTime * 4) * 0.3
                pizdecEffects.colorCorrection.Saturation = 1.5 + math.sin(shakeTime * 3) * 1
            end
            
            if pizdecEffects.bloom then
                pizdecEffects.bloom.Intensity = 1.5 + math.sin(shakeTime * 6) * 1.5
                pizdecEffects.bloom.Size = 25 + math.sin(shakeTime * 4) * 20
            end
            
            if pizdecEffects.blur then
                pizdecEffects.blur.Size = 4 + math.sin(shakeTime * 5) * 4
            end
            
            if pizdecEffects.dof then
                pizdecEffects.dof.FocusDistance = 5 + math.sin(shakeTime * 3) * 10
                pizdecEffects.dof.FarIntensity = 0.3 + math.sin(shakeTime * 2) * 0.5
            end
            
            if pizdecEffects.sunRays then
                pizdecEffects.sunRays.Intensity = 0.1 + math.sin(shakeTime * 4) * 0.2
            end
            
            if pizdecEffects.overlay and pizdecEffects.overlay:FindFirstChildOfClass("UIGradient") then
                local grad = pizdecEffects.overlay:FindFirstChildOfClass("UIGradient")
                grad.Rotation = (shakeTime * 100) % 360
                pizdecEffects.overlay.BackgroundTransparency = 0.6 + math.sin(shakeTime * 5) * 0.2
            end
            
            if pizdecOriginalCamera then
                local shakeX = math.sin(shakeTime * 30) * 0.5
                local shakeY = math.cos(shakeTime * 25) * 0.5
                local shakeZ = math.sin(shakeTime * 20) * 0.3
                local currentCam = camera.CFrame
                camera.CFrame = currentCam * CFrame.new(shakeX, shakeY, shakeZ) * CFrame.Angles(
                    math.sin(shakeTime * 15) * 0.02,
                    math.cos(shakeTime * 18) * 0.02,
                    math.sin(shakeTime * 12) * 0.03
                )
            end
        end)
    else
        TweenService:Create(pizdecSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(pizdecSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        clearPizdecEffects()
    end
end

pizdecSwitchBtn.MouseButton1Click:Connect(togglePizdec)

-- === ЛОГИКА БОТА ===
local function toggleBot()
    isBotEnabled = not isBotEnabled
    if isBotEnabled then
        TweenService:Create(botSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(botSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        
        if not parryEnabled then
            parryEnabled = true
            TweenService:Create(parrySwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
            TweenService:Create(parrySwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        end
        
        botConnection = RunService.Heartbeat:Connect(function(deltaTime)
            if not isBotEnabled then return end
            local char = player.Character
            local humanoid = char and char:FindFirstChildOfClass("Humanoid")
            local hrp = char and char:FindFirstChild("HumanoidRootPart")
            if not humanoid or not hrp then return end
            
            if not botMoveConnection or os.clock() - botMoveConnection > math.random(2, 4) then
                botMoveConnection = os.clock()
                local randomX = math.random(-20, 20)
                local randomZ = math.random(-20, 20)
                humanoid:MoveTo(hrp.Position + Vector3.new(randomX, 0, randomZ))
            end
            
            if not botLookConnection or os.clock() - botLookConnection > 0.5 then
                botLookConnection = os.clock()
                local randomYaw = math.random(-100, 100) / 100
                camera.CFrame = hrp.CFrame * CFrame.new(0, 5, 10) * CFrame.Angles(0, randomYaw, 0)
            end
            
            if math.random(1, 10) == 1 then
                humanoid.Jump = true
            end
        end)
    else
        TweenService:Create(botSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(botSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        
        if botConnection then botConnection:Disconnect() end
        if parryEnabled then
            parryEnabled = false
            TweenService:Create(parrySwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
            TweenService:Create(parrySwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        end
    end
end

botSwitchBtn.MouseButton1Click:Connect(toggleBot)

-- === ЛОГИКА ПЕРЕКЛЮЧЕНИЯ ВКЛАДОК ===
local activeTab = 1
local function setTab(activeTabNum)
    activeTab = activeTabNum
    tabCombat.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabRage.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabDamage.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabMovement.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabMisc.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabVisuals.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabFuns.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    tabSettings.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    
    combatPage.Visible = false
    ragePage.Visible = false
    damagePage.Visible = false
    movementPage.Visible = false
    miscPage.Visible = false
    visualsPage.Visible = false
    funsPage.Visible = false
    settingsPage.Visible = false
    
    if activeTab == 1 then
        tabCombat.BackgroundColor3 = menuAccentColor
        combatPage.Visible = true
    elseif activeTab == 2 then
        tabRage.BackgroundColor3 = menuAccentColor
        ragePage.Visible = true
    elseif activeTab == 3 then
        tabDamage.BackgroundColor3 = menuAccentColor
        damagePage.Visible = true
    elseif activeTab == 4 then
        tabMovement.BackgroundColor3 = menuAccentColor
        movementPage.Visible = true
    elseif activeTab == 5 then
        tabMisc.BackgroundColor3 = menuAccentColor
        miscPage.Visible = true
    elseif activeTab == 6 then
        tabVisuals.BackgroundColor3 = menuAccentColor
        visualsPage.Visible = true
    elseif activeTab == 7 then
        tabFuns.BackgroundColor3 = menuAccentColor
        funsPage.Visible = true
    elseif activeTab == 8 then
        tabSettings.BackgroundColor3 = menuAccentColor
        settingsPage.Visible = true
    end
end

setTab(1)

tabCombat.MouseButton1Click:Connect(function() setTab(1) end)
tabRage.MouseButton1Click:Connect(function() setTab(2) end)
tabDamage.MouseButton1Click:Connect(function() setTab(3) end)
tabMovement.MouseButton1Click:Connect(function() setTab(4) end)
tabMisc.MouseButton1Click:Connect(function() setTab(5) end)
tabVisuals.MouseButton1Click:Connect(function() setTab(6) end)
tabFuns.MouseButton1Click:Connect(function() setTab(7) end)
tabSettings.MouseButton1Click:Connect(function() setTab(8) end)

-- СВОРАЧИВАНИЕ
local isOpen = true
toggleBtn.MouseButton1Click:Connect(function()
	isOpen = not isOpen
	if isOpen then
		mainFrame.Size = UDim2.new(0, 350, 0, 480)
		sidebar.Visible = true
		contentFrame.Visible = true
		footerLabel.Visible = true
		toggleBtn.Text = "Ў"
	else
		mainFrame.Size = UDim2.new(0, 350, 0, 25)
		sidebar.Visible = false
		contentFrame.Visible = false
		footerLabel.Visible = false
		toggleBtn.Text = "^"
	end
end)

-- ЛОГИКА СЛАЙДЕРА СКОРОСТИ
local draggingSpeed = false
local function updateSpeedSlider(input)
	local percent = math.clamp((input.Position.X - sliderBg.AbsolutePosition.X) / sliderBg.AbsoluteSize.X, 0, 1)
	currentSpeed = math.floor(percent * maxSpeed)
	sliderFill.Size = UDim2.new(percent, 0, 1, 0)
	sliderKnob.Position = UDim2.new(percent, -10, 0.5, -10)
	speedLabel.Text = texts[currentLang].speed .. currentSpeed
end

sliderKnob.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSpeed = true end
end)
UserInputService.InputChanged:Connect(function(input)
	if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and draggingSpeed then
		updateSpeedSlider(input)
	end
end)
UserInputService.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSpeed = false end
end)

-- ЛОГИКА СЛАЙДЕРА ПЛАВНОСТИ АИМБОТА
local draggingSmooth = false
local function updateSmoothSlider(input)
	local percent = math.clamp((input.Position.X - smoothSliderBg.AbsolutePosition.X) / smoothSliderBg.AbsoluteSize.X, 0, 1)
	aimbotSmooth = percent
	smoothSliderFill.Size = UDim2.new(percent, 0, 1, 0)
	smoothSliderKnob.Position = UDim2.new(percent, -10, 0.5, -10)
	smoothLabel.Text = texts[currentLang].smooth .. string.format("%.2f", aimbotSmooth)
end

smoothSliderKnob.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSmooth = true end
end)
UserInputService.InputChanged:Connect(function(input)
	if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and draggingSmooth then
		updateSmoothSlider(input)
	end
end)
UserInputService.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingSmooth = false end
end)

-- ЛОГИКА СЛАЙДЕРА ДИСТАНЦИИ RAGE TP
local draggingRageTPDist = false
local function updateRageTPDistSlider(input)
	local percent = math.clamp((input.Position.X - rageTPSliderBg.AbsolutePosition.X) / rageTPSliderBg.AbsoluteSize.X, 0, 1)
	rageTPDistance = 3 + (percent * 7)
	rageTPSliderFill.Size = UDim2.new(percent, 0, 1, 0)
	rageTPSliderKnob.Position = UDim2.new(percent, -10, 0.5, -10)
	rageTPDistLabel.Text = texts[currentLang].distance .. string.format("%.1f", rageTPDistance)
end

rageTPSliderKnob.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingRageTPDist = true end
end)
UserInputService.InputChanged:Connect(function(input)
	if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and draggingRageTPDist then
		updateRageTPDistSlider(input)
	end
end)
UserInputService.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingRageTPDist = false end
end)

-- === ЛОГИКА АИМБОТА ===
local function getTarget()
    local closest = nil
    local shortestDist = math.huge
    local screenCenter = camera.ViewportSize / 2

    for _, p in ipairs(Players:GetPlayers()) do
        if p ~= player and p.Character then
            local head = p.Character:FindFirstChild("Head")
            if head then
                local screenPoint, onScreen = camera:WorldToViewportPoint(head.Position)
                if onScreen and screenPoint.Z > 0 then
                    local dist = (Vector2.new(screenPoint.X, screenPoint.Y) - screenCenter).Magnitude
                    if dist < shortestDist and dist < 150 then
                        shortestDist = dist
                        closest = p
                    end
                end
            end
        end
    end
    return closest
end

aimbotSwitchBtn.MouseButton1Click:Connect(function()
    aimbotEnabled = not aimbotEnabled
    if aimbotEnabled then
        TweenService:Create(aimbotSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(aimbotSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(aimbotSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(aimbotSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        aimbotTarget = nil
    end
end)

aimbotBindBtn.MouseButton1Click:Connect(function()
    if isListeningAimbot then return end
    isListeningAimbot = true
    aimbotBindBtn.Text = "Жди..."
    aimbotBindBtn.TextColor3 = Color3.fromRGB(255, 200, 0)
end)

-- === ЛОГИКА RAGE TP ===
local function toggleRageTP()
    rageTPEnabled = not rageTPEnabled
    if rageTPEnabled then
        local rayOrigin = camera.CFrame.Position
        local rayDirection = camera.CFrame.LookVector * 1000
        local rayParams = RaycastParams.new()
        rayParams.FilterType = Enum.RaycastFilterType.Exclude
        rayParams.FilterDescendantsInstances = {player.Character}
        
        local rayResult = workspace:Raycast(rayOrigin, rayDirection, rayParams)
        local target = nil
        
        if rayResult and rayResult.Instance then
            local hitChar = rayResult.Instance:FindFirstAncestorOfClass("Model")
            if hitChar then
                local hitPlayer = Players:GetPlayerFromCharacter(hitChar)
                if hitPlayer and hitPlayer ~= player then
                    target = hitPlayer
                end
            end
        end
        
        if not target then
            target = getTarget()
        end
        
        if not target then
            rageTPEnabled = false
            return
        end
        
        rageTPTarget = target
        
        TweenService:Create(rageTPSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(rageTPSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        
        local char = player.Character
        local hrp = char and char:FindFirstChild("HumanoidRootPart")
        if hrp then
            rageTPOriginalPos = hrp.CFrame
        end
        
        if rageTPTarget.Character then
            local head = rageTPTarget.Character:FindFirstChild("Head")
            if head then
                rageTPMarker = Instance.new("BillboardGui")
                rageTPMarker.Name = "RageTPMarker"
                rageTPMarker.Size = UDim2.new(0, 100, 0, 50)
                rageTPMarker.StudsOffset = Vector3.new(0, 2.5, 0)
                rageTPMarker.AlwaysOnTop = true
                rageTPMarker.Parent = head
                
                local markerText = Instance.new("TextLabel")
                markerText.Size = UDim2.new(1, 0, 1, 0)
                markerText.BackgroundTransparency = 1
                markerText.Text = "??"
                markerText.TextColor3 = Color3.fromRGB(255, 50, 50)
                markerText.TextStrokeTransparency = 0
                markerText.Font = UI_FONT
                markerText.TextSize = 30
                markerText.Parent = rageTPMarker
            end
        end
        
        rageTPConnection = RunService.Heartbeat:Connect(function()
            if not rageTPEnabled or not rageTPTarget or not rageTPTarget.Character then return end
            
            local targetHrp = rageTPTarget.Character:FindFirstChild("HumanoidRootPart")
            local myHrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
            if targetHrp and myHrp then
                local behindPos = targetHrp.CFrame * CFrame.new(0, 0, rageTPDistance)
                myHrp.CFrame = behindPos
            end
        end)
    else
        TweenService:Create(rageTPSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(rageTPSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        
        if rageTPConnection then rageTPConnection:Disconnect() end
        if rageTPMarker then rageTPMarker:Destroy() rageTPMarker = nil end
        
        local char = player.Character
        local hrp = char and char:FindFirstChild("HumanoidRootPart")
        if hrp and rageTPOriginalPos then
            hrp.CFrame = rageTPOriginalPos
        end
        
        rageTPTarget = nil
    end
end

rageTPSwitchBtn.MouseButton1Click:Connect(toggleRageTP)

rageTPBindBtn.MouseButton1Click:Connect(function()
    if isListeningRageTP then return end
    isListeningRageTP = true
    rageTPBindBtn.Text = "Жди..."
    rageTPBindBtn.TextColor3 = Color3.fromRGB(255, 200, 0)
end)

aimbotClearBtn.MouseButton1Click:Connect(function()
    aimbotBind = nil
    aimbotBindBtn.Text = texts[currentLang].noBind
    aimbotBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
end)

rageTPClearBtn.MouseButton1Click:Connect(function()
    rageTPBind = nil
    rageTPBindBtn.Text = texts[currentLang].noBind
    rageTPBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
end)

clearBindBtn.MouseButton1Click:Connect(function()
    currentKey = nil
    bindButton.Text = texts[currentLang].noBind
    bindButton.TextColor3 = Color3.fromRGB(255, 255, 255)
end)

-- === ЛОГИКА DAMAGE ===
redBtn.MouseButton1Click:Connect(function()
    if not redPart then return end
    local char = player.Character
    local hrp = char and char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end
    
    local originalCFrame = redPart.CFrame
    redPart.CFrame = hrp.CFrame * CFrame.new(0, blockHeight, 0)
    task.wait(blockTime)
    redPart.CFrame = originalCFrame
end)

-- КАМЕРА
local function onInputChanged(input)
    if not isRagdollFeatureEnabled then return end
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        yaw -= input.Delta.X * 0.003
        pitch = math.clamp(pitch - input.Delta.Y * 0.003, -1.2, 1.2)
    elseif input.UserInputType == Enum.UserInputType.MouseWheel then
        distance = math.clamp(distance - input.Position.Z * 2, 5, 20)
    end
end

local function updateCamera(value)
    if not isRagdollFeatureEnabled then return end
    local ragdollActive = isRagdolled(value)
    local character = player.Character
    if not character then return end
    local humanoid = character:FindFirstChildOfClass("Humanoid")
    local head = character:FindFirstChild("Head")
    if renderConnection then renderConnection:Disconnect() end
    if inputConnection then inputConnection:Disconnect() end

    if ragdollActive then
        player.CameraMode = Enum.CameraMode.Classic
        camera.CameraType = Enum.CameraType.Scriptable
        UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
        inputConnection = UserInputService.InputChanged:Connect(onInputChanged)
        renderConnection = RunService.RenderStepped:Connect(function()
            resetTransparency(character)
            if head and head.Parent then
                local rot = CFrame.Angles(0, yaw, 0) * CFrame.Angles(pitch, 0, 0)
                local camPos = head.Position + rot:VectorToWorldSpace(Vector3.new(0, 0, distance))
                camera.CFrame = CFrame.new(camPos, head.Position)
            end
        end)
    else
        camera.CameraType = Enum.CameraType.Custom
        if humanoid then camera.CameraSubject = humanoid end
        UserInputService.MouseBehavior = Enum.MouseBehavior.Default
    end
end

local function hookRagdolled(character)
    if ragdolledConnection then ragdolledConnection:Disconnect() end
    local stats = player:FindFirstChild("stats")
    if not stats then return end
    local ragdolled = stats:WaitForChild("ragdolled", 5)
    if not ragdolled then return end
    local humanoid = character:WaitForChild("Humanoid", 5)
    if humanoid then humanoid.Died:Connect(function() ragdolled.Value = true end) end
    ragdolledConnection = ragdolled.Changed:Connect(updateCamera)
    updateCamera(ragdolled.Value)
end
player.CharacterAdded:Connect(function(character) task.wait(0.1) hookRagdolled(character) end)
if player.Character then hookRagdolled(player.Character) end

switchBtn.MouseButton1Click:Connect(function()
    isRagdollFeatureEnabled = not isRagdollFeatureEnabled
    if isRagdollFeatureEnabled then
        TweenService:Create(switchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(switchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        local stats = player:FindFirstChild("stats")
        if stats and stats:FindFirstChild("ragdolled") then updateCamera(stats.ragdolled.Value) end
    else
        TweenService:Create(switchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(switchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        if renderConnection then renderConnection:Disconnect() end
        if inputConnection then inputConnection:Disconnect() end
        camera.CameraType = Enum.CameraType.Custom
        local char = player.Character
        if char and char:FindFirstChildOfClass("Humanoid") then camera.CameraSubject = char:FindFirstChildOfClass("Humanoid") end
        UserInputService.MouseBehavior = Enum.MouseBehavior.Default
    end
end)

speedoSwitchBtn.MouseButton1Click:Connect(function()
    isSpeedometerEnabled = not isSpeedometerEnabled
    if isSpeedometerEnabled then
        TweenService:Create(speedoSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(speedoSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        speedometerGui.Enabled = true
    else
        TweenService:Create(speedoSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(speedoSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        speedometerGui.Enabled = false
    end
end)

parrySwitchBtn.MouseButton1Click:Connect(function()
    parryEnabled = not parryEnabled
    if parryEnabled then
        TweenService:Create(parrySwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(parrySwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(parrySwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(parrySwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
    end
end)

rainbowSwitchBtn.MouseButton1Click:Connect(function()
    rainbowEnabled = not rainbowEnabled
    if rainbowEnabled then
        TweenService:Create(rainbowSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(rainbowSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(rainbowSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(rainbowSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        setTab(activeTab)
    end
end)

namesSwitchBtn.MouseButton1Click:Connect(function()
    namesEnabled = not namesEnabled
    if namesEnabled then
        TweenService:Create(namesSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(namesSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(namesSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(namesSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
    end
end)

distSwitchBtn.MouseButton1Click:Connect(function()
    distEnabled = not distEnabled
    if distEnabled then
        TweenService:Create(distSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(distSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(distSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(distSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
    end
end)

hlSwitchBtn.MouseButton1Click:Connect(function()
    highlightEnabled = not highlightEnabled
    if highlightEnabled then
        TweenService:Create(hlSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(hlSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
    else
        TweenService:Create(hlSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(hlSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
    end
end)

fbSwitchBtn.MouseButton1Click:Connect(function()
    fullbrightEnabled = not fullbrightEnabled
    if fullbrightEnabled then
        TweenService:Create(fbSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = menuAccentColor}):Play()
        TweenService:Create(fbSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(1, -18, 0.5, -8)}):Play()
        
        originalLighting.Ambient = Lighting.Ambient
        originalLighting.OutdoorAmbient = Lighting.OutdoorAmbient
        originalLighting.Brightness = Lighting.Brightness
        originalLighting.ClockTime = Lighting.ClockTime
        originalLighting.FogEnd = Lighting.FogEnd
        originalLighting.GlobalShadows = Lighting.GlobalShadows
        
        Lighting.Ambient = Color3.fromRGB(255, 255, 255)
        Lighting.OutdoorAmbient = Color3.fromRGB(255, 255, 255)
        Lighting.Brightness = 2
        Lighting.ClockTime = 12
        Lighting.FogEnd = 100000
        Lighting.GlobalShadows = false
    else
        TweenService:Create(fbSwitchBtn, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(60, 60, 60)}):Play()
        TweenService:Create(fbSwitchKnob, TweenInfo.new(0.2), {Position = UDim2.new(0, 2, 0.5, -8)}):Play()
        
        if originalLighting.Ambient then Lighting.Ambient = originalLighting.Ambient end
        if originalLighting.OutdoorAmbient then Lighting.OutdoorAmbient = originalLighting.OutdoorAmbient end
        if originalLighting.Brightness then Lighting.Brightness = originalLighting.Brightness end
        if originalLighting.ClockTime then Lighting.ClockTime = originalLighting.ClockTime end
        if originalLighting.FogEnd then Lighting.FogEnd = originalLighting.FogEnd end
        if originalLighting.GlobalShadows ~= nil then Lighting.GlobalShadows = originalLighting.GlobalShadows end
    end
end)

-- РАДУГА В РЕАЛЬНОМ ВРЕМЕНИ
local hue = 0
RunService.RenderStepped:Connect(function(deltaTime)
    if rainbowEnabled then
        hue = (hue + deltaTime * 0.5) % 1
        local rainbowColor = Color3.fromHSV(hue, 1, 1)
        tabCombat.BackgroundColor3 = rainbowColor
        tabRage.BackgroundColor3 = rainbowColor
        tabDamage.BackgroundColor3 = rainbowColor
        tabMovement.BackgroundColor3 = rainbowColor
        tabMisc.BackgroundColor3 = rainbowColor
        tabVisuals.BackgroundColor3 = rainbowColor
        tabFuns.BackgroundColor3 = rainbowColor
        tabSettings.BackgroundColor3 = rainbowColor
    end
end)

-- ОБНОВЛЕНИЕ ESP
RunService.RenderStepped:Connect(function()
    local currentPlayers = {}
    
    for _, p in ipairs(Players:GetPlayers()) do
        if p ~= player and p.Character then
            local hrp = p.Character:FindFirstChild("HumanoidRootPart")
            local head = p.Character:FindFirstChild("Head")
            local humanoid = p.Character:FindFirstChildOfClass("Humanoid")
            
            if hrp and head and humanoid and humanoid.Health > 0 then
                currentPlayers[p] = true
                
                if not espObjects[p] then
                    espObjects[p] = {
                        name = Instance.new("TextLabel"),
                        dist = Instance.new("TextLabel"),
                        highlight = Instance.new("Highlight")
                    }
                    
                    espObjects[p].name.Name = "ESP_Name"
                    espObjects[p].name.BackgroundTransparency = 1
                    espObjects[p].name.TextColor3 = espColor
                    espObjects[p].name.TextStrokeTransparency = 0
                    espObjects[p].name.Font = Enum.Font.GothamBold
                    espObjects[p].name.TextSize = 14
                    espObjects[p].name.Text = p.Name
                    espObjects[p].name.Parent = espGui
                    
                    espObjects[p].dist.Name = "ESP_Dist"
                    espObjects[p].dist.BackgroundTransparency = 1
                    espObjects[p].dist.TextColor3 = espColor
                    espObjects[p].dist.TextStrokeTransparency = 0
                    espObjects[p].dist.Font = Enum.Font.GothamBold
                    espObjects[p].dist.TextSize = 12
                    espObjects[p].dist.Parent = espGui
                    
                    espObjects[p].highlight.FillColor = espColor
                    espObjects[p].highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
                    espObjects[p].highlight.FillTransparency = 0.5
                    espObjects[p].highlight.Parent = p.Character
                end
                
                local objs = espObjects[p]
                
                local headPos = head.Position + Vector3.new(0, 1, 0)
                local screenPoint, onScreen = camera:WorldToViewportPoint(headPos)
                
                if onScreen and screenPoint.Z > 0 then
                    if distEnabled then
                        objs.dist.Visible = true
                        local distValue = math.floor((hrp.Position - player.Character.HumanoidRootPart.Position).Magnitude)
                        objs.dist.Text = distValue .. "m"
                        objs.dist.Position = UDim2.new(0, screenPoint.X, 0, screenPoint.Y + 18)
                        objs.dist.TextColor3 = espColor
                    else
                        objs.dist.Visible = false
                    end
                    
                    if namesEnabled then
                        objs.name.Visible = true
                        objs.name.Position = UDim2.new(0, screenPoint.X, 0, screenPoint.Y)
                        objs.name.TextColor3 = espColor
                    else
                        objs.name.Visible = false
                    end
                else
                    objs.name.Visible = false
                    objs.dist.Visible = false
                end
                
                if highlightEnabled then
                    objs.highlight.Parent = p.Character
                    objs.highlight.FillColor = espColor
                else
                    if objs.highlight.Parent then objs.highlight.Parent = nil end
                end
            end
        end
    end
    
    for p, objs in pairs(espObjects) do
        if not currentPlayers[p] then
            if objs.name then objs.name:Destroy() end
            if objs.dist then objs.dist:Destroy() end
            if objs.highlight then objs.highlight:Destroy() end
            espObjects[p] = nil
        end
    end
end)

-- ОБНОВЛЕНИЕ АИМБОТА
RunService.RenderStepped:Connect(function(deltaTime)
    if not aimbotEnabled or not aimbotTarget then return end
    
    local targetChar = aimbotTarget.Character
    if not targetChar then return end
    
    local targetHead = targetChar:FindFirstChild("Head")
    if not targetHead then return end
    
    local targetPos = targetHead.Position
    local currentCFrame = camera.CFrame
    local targetCFrame = CFrame.new(currentCFrame.Position, targetPos)
    
    camera.CFrame = currentCFrame:Lerp(targetCFrame, aimbotSmooth)
end)

-- ОБНОВЛЕНИЕ МЕТОК ENIGMA
RunService.RenderStepped:Connect(function()
    for _, p in ipairs(Players:GetPlayers()) do
        if p ~= player and p:FindFirstChild("IsEnigmaUser") then
            local char = p.Character
            local head = char and char:FindFirstChild("Head")
            if head then
                if not enigmaTags[p] then
                    local label = Instance.new("BillboardGui")
                    label.Name = "EnigmaTag"
                    label.Size = UDim2.new(0, 200, 0, 50)
                    label.StudsOffset = Vector3.new(0, 2.5, 0)
                    label.AlwaysOnTop = true
                    label.Parent = head

                    local text = Instance.new("TextLabel")
                    text.Size = UDim2.new(1, 0, 1, 0)
                    text.BackgroundTransparency = 1
                    text.Text = "¦enigma user¦"
                    text.TextColor3 = Color3.fromRGB(255, 50, 50)
                    text.TextStrokeTransparency = 0
                    text.Font = UI_FONT
                    text.TextSize = 16
                    text.Parent = label
                    
                    enigmaTags[p] = label
                end
                
                if enigmaTags[p].Parent ~= head then
                    enigmaTags[p].Parent = head
                end
            end
        elseif p ~= player then
            if enigmaTags[p] then
                enigmaTags[p]:Destroy()
                enigmaTags[p] = nil
            end
        end
    end
end)

-- БИНДЫ
bindButton.MouseButton1Click:Connect(function()
	if isListening then return end
	isListening = true
	bindButton.Text = "Жди..."
	bindButton.TextColor3 = Color3.fromRGB(255, 200, 0)
end)

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if isListeningAimbot then
        if input.UserInputType == Enum.UserInputType.Keyboard then
            aimbotBind = input.KeyCode
            aimbotBindBtn.Text = "[" .. aimbotBind.Name .. "] " .. texts[currentLang].bind
            aimbotBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
            isListeningAimbot = false
        end
        return
    end
    
    if isListeningRageTP then
        if input.UserInputType == Enum.UserInputType.Keyboard then
            rageTPBind = input.KeyCode
            rageTPBindBtn.Text = "[" .. rageTPBind.Name .. "] " .. texts[currentLang].bind
            rageTPBindBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
            isListeningRageTP = false
        end
        return
    end
    
	if isListening then
		if input.UserInputType == Enum.UserInputType.Keyboard then
			currentKey = input.KeyCode
			bindButton.Text = "[" .. currentKey.Name .. "] " .. texts[currentLang].ragdoll
			bindButton.TextColor3 = Color3.fromRGB(255, 255, 255)
			isListening = false
		end
		return
	end
	
	if not gameProcessed then
	    if aimbotBind and input.KeyCode == aimbotBind and aimbotEnabled then
	        if aimbotTarget then
	            aimbotTarget = nil
	        else
	            aimbotTarget = getTarget()
	        end
	    end
	    
	    if rageTPBind and input.KeyCode == rageTPBind then
	        toggleRageTP()
	    end
	    
	    if currentKey and input.KeyCode == currentKey then
            if debounce then return end
            local char = player.Character
            local hrp = char and char:FindFirstChild("HumanoidRootPart")
            if not hrp then return end
            debounce = true
            local originalCFrame = originalBlock.CFrame
            originalBlock.CFrame = hrp.CFrame * CFrame.new(0, blockHeight, 0)
            if currentSpeed > 0 then
                local lookDirection = hrp.CFrame.LookVector
                local forwardDirection = Vector3.new(lookDirection.X, 0, lookDirection.Z).Unit
                hrp.AssemblyLinearVelocity = forwardDirection * currentSpeed
            end
            task.wait(blockTime)
            originalBlock.CFrame = originalCFrame
            debounce = false
        end
	end
end)

-- AUTOPARRY
local function parryHrp(p) local c = p.Character; return c and c:FindFirstChild("HumanoidRootPart") end
local function parryDist(p) local a = parryHrp(player); local b = parryHrp(p); if not a or not b then return math.huge end; return (a.Position - b.Position).Magnitude end
local function parryRelease() parryToken += 1; parryHolding = false; if mouse2release then mouse2release() end end
local function parryPressWithTimer(duration)
	parryToken += 1
	local token = parryToken
	if not parryHolding then if mouse2press then mouse2press() end; parryHolding = true end
	task.spawn(function()
		task.wait(duration)
		if token ~= parryToken then return end
		if mouse2release then mouse2release() end
		parryHolding = false
	end)
end

RunService.RenderStepped:Connect(function()
	if not parryEnabled then return end
	for _, p in ipairs(Players:GetPlayers()) do
		if p ~= player then
			local stats = p:FindFirstChild("stats")
			local anim = stats and stats:FindFirstChild("animstate")
			local state = anim and anim.Value
			if state then
				local d = parryDist(p)
				if lastState[p] ~= state then
					lastState[p] = state
					if state == "dropkicking" then
						if d <= MAX_DISTANCE then parryPressWithTimer(TIMING.dropkick) end
					elseif state == "1windupswing" or state == "-1windupswing" then
						if d <= MAX_DISTANCE then parryPressWithTimer(TIMING.windup) end
					elseif state == "throwdo" then
						if d <= MAX_DISTANCE then parryPressWithTimer(TIMING.default) end
					elseif STATES[state] then
						if d <= MAX_DISTANCE then parryPressWithTimer(TIMING.default) end
					end
				end
			end
		end
	end
end)

-- СПИДОМЕТР
RunService.RenderStepped:Connect(function()
	if not isSpeedometerEnabled then return end
	if not player.Character then return end
	local hrp = player.Character:FindFirstChild("HumanoidRootPart")
	if not hrp then return end
	local actualSpeed = hrp.AssemblyLinearVelocity.Magnitude
	local percent = math.clamp(actualSpeed / maxSpeed, 0, 1)
	speedoText.Text = math.floor(actualSpeed) .. " u/s"
	speedoText.TextColor3 = Color3.fromRGB(255, 255 - (percent * 200), 255 - (percent * 200))
	speedoText.TextSize = 36 + (percent * 15)
	if percent > 0.2 then
		vibrationIntensity = percent * 5
		speedoFrame.Position = baseSpeedoPos + UDim2.new(0, math.random(-vibrationIntensity, vibrationIntensity), 0, math.random(-vibrationIntensity, vibrationIntensity))
	else
		vibrationIntensity = 0
		speedoFrame.Position = baseSpeedoPos
	end
end)

end -- конец initMenu

-- =========================================================
-- === ЗАПУСК ===
-- =========================================================
startSnakeGame()
Executor compatibility changes over time. Check current reports before testing.

Copy the code above into a compatible Roblox script executor if you choose to test it.

dzielnica Script Status

✓AvailabilityFree
$Price$0
◫CompatibilityDesktop & Mobile
★SafetyVerified

Roblox and game updates can affect compatibility, so the script’s status should be treated as temporary rather than guaranteed.

Frequently Asked Questions

What is a dzielnica script?

A dzielnica script is third-party Lua code intended to run alongside the Roblox game through a compatible script executor.

What features does this dzielnica script include?

Different scripts contain different code. This version includes: programnoe abezpichenie (vibecode).

How do you use the dzielnica script?

Pick a compatible executor such as Hydrogen, MacSploit, AWP.GG, Delta, Fluxus, Codex, launch Roblox and join the game, copy the complete Lua code from the script card above, paste it into the executor’s editor, and click Run or Execute. Compatibility changes over time, so a name here doesn’t guarantee current support.

Can a dzielnica script get your Roblox account banned?

Yes. Third-party scripts can violate Roblox rules and may put an account at risk. Only use code from a source you trust, never enter your Roblox password into a script or executor, and test on an alternate account first.

Does the dzielnica script work on mobile?

Check whether both the executor and the script support your device and the current Roblox version. Mobile executor support does not guarantee that every script will work.

Check out our Roblox Scripts hub and Roblox Games Directory for more.

Leave a Comment