God Menu V3 (Ru, Type Any Key To Unlock)
Key RequiredUniversal

God Menu V3 (Ru, Type Any Key To Unlock)

Universal Scriptsergeyplay122sergeyplay122 1K views 16.3K executesUpdated Sep 13, 2026
Unrated
00
Lua Script•1929 lines (76185 chars)
-- ФИКСИРОВАННЫЙ КЛЮЧ (рандом: TAM228 / 907Y70)
local KEY1 = "TAM228"
local KEY2 = "907Y70"
local OWNER_ID = 4924074493

-- ======================
-- ОСНОВНОЕ МЕНЮ (RAYFIELD)
-- ======================
local function loadMenu()
    local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
    if not Rayfield then
        warn("Rayfield не загрузился")
        return
    end

    local Window = Rayfield:CreateWindow({
        Name = "God Menu",
        LoadingTitle = "Loading...",
        LoadingSubtitle = "By tam_aboba228 & 907y70",
        ConfigurationSaving = {Enabled = false}
    })

    local MainTab = Window:CreateTab("tam_aboba228", 4483362458)
    local ControlTab = Window:CreateTab("907y70", 4483362458)
    local lp = game.Players.LocalPlayer
    local mouse = lp:GetMouse()

    -- ======================
    -- X-RAY ФУНКЦИЯ
    -- ======================
    local xrayActive = false
    local originalTransparencies = {}

    local function toggleXRay()
        xrayActive = not xrayActive
        
        if xrayActive then
            originalTransparencies = {}
            local count = 0
            
            for _, obj in pairs(workspace:GetDescendants()) do
                if obj:IsA("BasePart") and not obj:IsDescendantOf(lp.Character) then
                    if not originalTransparencies[obj] then
                        originalTransparencies[obj] = obj.Transparency
                    end
                    obj.Transparency = 0.7
                    count = count + 1
                end
            end
            
            Rayfield:Notify({Title="X-Ray ON", Content="Все блоки стали 70% прозрачными (" .. count .. " объектов)", Duration=3})
        else
            local count = 0
            for obj, origTrans in pairs(originalTransparencies) do
                if obj and obj.Parent then
                    obj.Transparency = origTrans
                    count = count + 1
                end
            end
            originalTransparencies = {}
            Rayfield:Notify({Title="X-Ray OFF", Content="Прозрачность восстановлена (" .. count .. " объектов)", Duration=3})
        end
    end

    local function onDescendantAdded(descendant)
        if xrayActive then
            if descendant:IsA("BasePart") and not descendant:IsDescendantOf(lp.Character) then
                if not originalTransparencies[descendant] then
                    originalTransparencies[descendant] = descendant.Transparency
                end
                descendant.Transparency = 0.7
            end
        end
    end

    workspace.DescendantAdded:Connect(onDescendantAdded)

    -- ======================
    -- ПЛАТФОРМА ПОД НОГАМИ
    -- ======================
    local platform = nil
    local platformSize = Vector3.new(5, 0.5, 5)
    local platformColor = Color3.fromRGB(100, 100, 255)
    local platformTransparency = 0.5
    local platformActive = false
    local platformConnection = nil
    local fixedY = nil
    local controlButtons = nil
    local upButton = nil
    local downButton = nil
    local upHoldConnection = nil
    local downHoldConnection = nil

    local function startMoveUp()
        if upHoldConnection then return end
        upHoldConnection = game:GetService("RunService").Heartbeat:Connect(function()
            if platform and fixedY then
                fixedY = fixedY + 0.2
            end
        end)
    end

    local function stopMoveUp()
        if upHoldConnection then
            upHoldConnection:Disconnect()
            upHoldConnection = nil
        end
    end

    local function startMoveDown()
        if downHoldConnection then return end
        downHoldConnection = game:GetService("RunService").Heartbeat:Connect(function()
            if platform and fixedY then
                fixedY = fixedY - 0.2
            end
        end)
    end

    local function stopMoveDown()
        if downHoldConnection then
            downHoldConnection:Disconnect()
            downHoldConnection = nil
        end
    end

    local function createControlButtons()
        if controlButtons then controlButtons:Destroy() end
        
        controlButtons = Instance.new("ScreenGui")
        controlButtons.Name = "PlatformControls"
        controlButtons.ResetOnSpawn = false
        controlButtons.Parent = game.CoreGui
        
        local jumpBtnX = -140
        local jumpBtnY = -250
        local buttonSize = 20
        local spacing = 5
        
        upButton = Instance.new("TextButton")
        upButton.Size = UDim2.new(0, buttonSize, 0, buttonSize)
        upButton.Position = UDim2.new(1, jumpBtnX + 35 - buttonSize - spacing, 1, jumpBtnY - buttonSize - spacing)
        upButton.BackgroundColor3 = Color3.fromRGB(0, 200, 0)
        upButton.Text = "▲"
        upButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        upButton.TextSize = 12
        upButton.Font = Enum.Font.GothamBold
        upButton.Parent = controlButtons
        Instance.new("UICorner", upButton).CornerRadius = UDim.new(0, 3)
        
        downButton = Instance.new("TextButton")
        downButton.Size = UDim2.new(0, buttonSize, 0, buttonSize)
        downButton.Position = UDim2.new(1, jumpBtnX + 35, 1, jumpBtnY - buttonSize - spacing)
        downButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
        downButton.Text = "▼"
        downButton.TextColor3 = Color3.fromRGB(255, 255, 255)
        downButton.TextSize = 12
        downButton.Font = Enum.Font.GothamBold
        downButton.Parent = controlButtons
        Instance.new("UICorner", downButton).CornerRadius = UDim.new(0, 3)
        
        upButton.MouseButton1Down:Connect(startMoveUp)
        upButton.MouseButton1Up:Connect(stopMoveUp)
        upButton.MouseLeave:Connect(stopMoveUp)
        
        downButton.MouseButton1Down:Connect(startMoveDown)
        downButton.MouseButton1Up:Connect(stopMoveDown)
        downButton.MouseLeave:Connect(stopMoveDown)
    end

    local function destroyControlButtons()
        if upHoldConnection then stopMoveUp() end
        if downHoldConnection then stopMoveDown() end
        if controlButtons then
            controlButtons:Destroy()
            controlButtons = nil
            upButton = nil
            downButton = nil
        end
    end

    local function updatePlatformPosition()
        if platformActive and platform and lp.Character and fixedY then
            local root = lp.Character:FindFirstChild("HumanoidRootPart")
            if root then
                platform.Position = Vector3.new(root.Position.X, fixedY, root.Position.Z)
            end
        end
    end

    local function applyPlatformSettings()
        if platform then
            platform.Size = platformSize
            platform.Color = platformColor
            platform.Transparency = platformTransparency
            local box = platform:FindFirstChildOfClass("SelectionBox")
            if box then
                box.Color3 = platformColor
            end
        end
    end

    local function createPlatform()
        if platform then
            destroyPlatform()
            task.wait(0.1)
        end
        
        if not lp.Character or not lp.Character:FindFirstChild("HumanoidRootPart") then
            Rayfield:Notify({Title="Ошибка", Content="Персонаж не найден", Duration=2})
            return false
        end
        
        local root = lp.Character.HumanoidRootPart
        fixedY = root.Position.Y - 2
        
        platform = Instance.new("Part")
        platform.Name = "FloatingPlatform"
        platform.Size = platformSize
        platform.Position = Vector3.new(root.Position.X, fixedY, root.Position.Z)
        platform.Color = platformColor
        platform.Transparency = platformTransparency
        platform.Material = Enum.Material.Neon
        platform.Anchored = true
        platform.CanCollide = true
        platform.CanQuery = true
        platform.CanTouch = true
        platform.Parent = workspace
        
        local selectionBox = Instance.new("SelectionBox")
        selectionBox.Adornee = platform
        selectionBox.Color3 = platformColor
        selectionBox.LineThickness = 0.05
        selectionBox.SurfaceTransparency = 0.7
        selectionBox.Parent = platform
        
        platformActive = true
        platformConnection = game:GetService("RunService").Heartbeat:Connect(updatePlatformPosition)
        
        createControlButtons()
        
        Rayfield:Notify({Title="Платформа", Content="Создана! Зажми ▲ или ▼ для движения", Duration=3})
        return true
    end

    local function destroyPlatform()
        if platform then
            platform:Destroy()
            platform = nil
        end
        if platformConnection then
            platformConnection:Disconnect()
            platformConnection = nil
        end
        platformActive = false
        fixedY = nil
        destroyControlButtons()
        Rayfield:Notify({Title="Платформа", Content="Платформа и кнопки управления удалены", Duration=2})
    end
-- ======================
-- НАСТРОЙКИ ПЛАТФОРМЫ
-- ======================
local function showPlatformSettings()
    local settingsGui = Instance.new("ScreenGui")
    settingsGui.Name = "PlatformSettings"
    settingsGui.ResetOnSpawn = false
    settingsGui.Parent = game.CoreGui

    local mainFrame = Instance.new("Frame")
    mainFrame.Size = UDim2.new(0, 300, 0, 500)
    mainFrame.Position = UDim2.new(0.5, -150, 0.5, -250)
    mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
    mainFrame.BorderSizePixel = 0
    mainFrame.Parent = settingsGui
    Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12)

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 35)
    title.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
    title.Text = "⚙️ Настройки платформы"
    title.TextColor3 = Color3.fromRGB(255, 255, 255)
    title.TextSize = 16
    title.Font = Enum.Font.GothamBold
    title.Parent = mainFrame
    Instance.new("UICorner", title).CornerRadius = UDim.new(0, 12)

    local closeBtn = Instance.new("TextButton")
    closeBtn.Size = UDim2.new(0, 30, 0, 30)
    closeBtn.Position = UDim2.new(1, -35, 0, 2.5)
    closeBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
    closeBtn.Text = "✕"
    closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    closeBtn.TextSize = 18
    closeBtn.Font = Enum.Font.GothamBold
    closeBtn.Parent = title
    Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 6)
    
    closeBtn.MouseButton1Click:Connect(function()
        settingsGui:Destroy()
    end)

    local yPos = 50

    local rLabel = Instance.new("TextLabel")
    rLabel.Size = UDim2.new(0.8, 0, 0, 20)
    rLabel.Position = UDim2.new(0.1, 0, 0, yPos)
    rLabel.BackgroundTransparency = 1
    rLabel.Text = "🔴 Красный (0-255): " .. math.floor(platformColor.R * 255)
    rLabel.TextColor3 = Color3.fromRGB(255, 200, 200)
    rLabel.TextSize = 12
    rLabel.Font = Enum.Font.Gotham
    rLabel.Parent = mainFrame

    local rSlider = Instance.new("TextButton")
    rSlider.Size = UDim2.new(0.8, 0, 0, 25)
    rSlider.Position = UDim2.new(0.1, 0, 0, yPos + 22)
    rSlider.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    rSlider.Text = math.floor(platformColor.R * 255)
    rSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
    rSlider.TextSize = 12
    rSlider.Font = Enum.Font.Gotham
    rSlider.Parent = mainFrame
    Instance.new("UICorner", rSlider).CornerRadius = UDim.new(0, 6)

    local rValue = math.floor(platformColor.R * 255)
    rSlider.MouseButton1Click:Connect(function()
        local input = Instance.new("TextBox")
        input.Size = UDim2.new(0, 100, 0, 30)
        input.Position = UDim2.new(0.5, -50, 0.5, -15)
        input.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
        input.Text = tostring(rValue)
        input.PlaceholderText = "0-255"
        input.TextColor3 = Color3.fromRGB(255, 255, 255)
        input.Font = Enum.Font.Gotham
        input.Parent = mainFrame
        Instance.new("UICorner", input).CornerRadius = UDim.new(0, 6)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0, 60, 0, 30)
        confirm.Position = UDim2.new(0.5, 55, 0.5, -15)
        confirm.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
        confirm.Text = "OK"
        confirm.TextColor3 = Color3.fromRGB(255, 255, 255)
        confirm.Font = Enum.Font.GothamBold
        confirm.Parent = mainFrame
        Instance.new("UICorner", confirm).CornerRadius = UDim.new(0, 6)

        confirm.MouseButton1Click:Connect(function()
            local val = tonumber(input.Text)
            if val and val >= 0 and val <= 255 then
                rValue = val
                platformColor = Color3.fromRGB(rValue, math.floor(platformColor.G * 255), math.floor(platformColor.B * 255))
                rSlider.Text = tostring(rValue)
                rLabel.Text = "🔴 Красный (0-255): " .. rValue
                applyPlatformSettings()
            end
            input:Destroy()
            confirm:Destroy()
        end)
    end)

    yPos = yPos + 55

    local gLabel = Instance.new("TextLabel")
    gLabel.Size = UDim2.new(0.8, 0, 0, 20)
    gLabel.Position = UDim2.new(0.1, 0, 0, yPos)
    gLabel.BackgroundTransparency = 1
    gLabel.Text = "🟢 Зелёный (0-255): " .. math.floor(platformColor.G * 255)
    gLabel.TextColor3 = Color3.fromRGB(200, 255, 200)
    gLabel.TextSize = 12
    gLabel.Font = Enum.Font.Gotham
    gLabel.Parent = mainFrame

    local gSlider = Instance.new("TextButton")
    gSlider.Size = UDim2.new(0.8, 0, 0, 25)
    gSlider.Position = UDim2.new(0.1, 0, 0, yPos + 22)
    gSlider.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    gSlider.Text = math.floor(platformColor.G * 255)
    gSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
    gSlider.TextSize = 12
    gSlider.Font = Enum.Font.Gotham
    gSlider.Parent = mainFrame
    Instance.new("UICorner", gSlider).CornerRadius = UDim.new(0, 6)

    local gValue = math.floor(platformColor.G * 255)
    gSlider.MouseButton1Click:Connect(function()
        local input = Instance.new("TextBox")
        input.Size = UDim2.new(0, 100, 0, 30)
        input.Position = UDim2.new(0.5, -50, 0.5, -15)
        input.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
        input.Text = tostring(gValue)
        input.PlaceholderText = "0-255"
        input.TextColor3 = Color3.fromRGB(255, 255, 255)
        input.Font = Enum.Font.Gotham
        input.Parent = mainFrame
        Instance.new("UICorner", input).CornerRadius = UDim.new(0, 6)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0, 60, 0, 30)
        confirm.Position = UDim2.new(0.5, 55, 0.5, -15)
        confirm.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
        confirm.Text = "OK"
        confirm.TextColor3 = Color3.fromRGB(255, 255, 255)
        confirm.Font = Enum.Font.GothamBold
        confirm.Parent = mainFrame
        Instance.new("UICorner", confirm).CornerRadius = UDim.new(0, 6)

        confirm.MouseButton1Click:Connect(function()
            local val = tonumber(input.Text)
            if val and val >= 0 and val <= 255 then
                gValue = val
                platformColor = Color3.fromRGB(math.floor(platformColor.R * 255), gValue, math.floor(platformColor.B * 255))
                gSlider.Text = tostring(gValue)
                gLabel.Text = "🟢 Зелёный (0-255): " .. gValue
                applyPlatformSettings()
            end
            input:Destroy()
            confirm:Destroy()
        end)
    end)

    yPos = yPos + 55

    local bLabel = Instance.new("TextLabel")
    bLabel.Size = UDim2.new(0.8, 0, 0, 20)
    bLabel.Position = UDim2.new(0.1, 0, 0, yPos)
    bLabel.BackgroundTransparency = 1
    bLabel.Text = "🔵 Синий (0-255): " .. math.floor(platformColor.B * 255)
    bLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
    bLabel.TextSize = 12
    bLabel.Font = Enum.Font.Gotham
    bLabel.Parent = mainFrame

    local bSlider = Instance.new("TextButton")
    bSlider.Size = UDim2.new(0.8, 0, 0, 25)
    bSlider.Position = UDim2.new(0.1, 0, 0, yPos + 22)
    bSlider.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    bSlider.Text = math.floor(platformColor.B * 255)
    bSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
    bSlider.TextSize = 12
    bSlider.Font = Enum.Font.Gotham
    bSlider.Parent = mainFrame
    Instance.new("UICorner", bSlider).CornerRadius = UDim.new(0, 6)

    local bValue = math.floor(platformColor.B * 255)
    bSlider.MouseButton1Click:Connect(function()
        local input = Instance.new("TextBox")
        input.Size = UDim2.new(0, 100, 0, 30)
        input.Position = UDim2.new(0.5, -50, 0.5, -15)
        input.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
        input.Text = tostring(bValue)
        input.PlaceholderText = "0-255"
        input.TextColor3 = Color3.fromRGB(255, 255, 255)
        input.Font = Enum.Font.Gotham
        input.Parent = mainFrame
        Instance.new("UICorner", input).CornerRadius = UDim.new(0, 6)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0, 60, 0, 30)
        confirm.Position = UDim2.new(0.5, 55, 0.5, -15)
        confirm.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
        confirm.Text = "OK"
        confirm.TextColor3 = Color3.fromRGB(255, 255, 255)
        confirm.Font = Enum.Font.GothamBold
        confirm.Parent = mainFrame
        Instance.new("UICorner", confirm).CornerRadius = UDim.new(0, 6)

        confirm.MouseButton1Click:Connect(function()
            local val = tonumber(input.Text)
            if val and val >= 0 and val <= 255 then
                bValue = val
                platformColor = Color3.fromRGB(math.floor(platformColor.R * 255), math.floor(platformColor.G * 255), bValue)
                bSlider.Text = tostring(bValue)
                bLabel.Text = "🔵 Синий (0-255): " .. bValue
                applyPlatformSettings()
            end
            input:Destroy()
            confirm:Destroy()
        end)
    end)

    yPos = yPos + 55

    local transLabel = Instance.new("TextLabel")
    transLabel.Size = UDim2.new(0.8, 0, 0, 20)
    transLabel.Position = UDim2.new(0.1, 0, 0, yPos)
    transLabel.BackgroundTransparency = 1
    transLabel.Text = "💎 Прозрачность (0-1): " .. platformTransparency
    transLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    transLabel.TextSize = 12
    transLabel.Font = Enum.Font.Gotham
    transLabel.Parent = mainFrame

    local transSlider = Instance.new("TextButton")
    transSlider.Size = UDim2.new(0.8, 0, 0, 25)
    transSlider.Position = UDim2.new(0.1, 0, 0, yPos + 22)
    transSlider.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    transSlider.Text = tostring(platformTransparency)
    transSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
    transSlider.TextSize = 12
    transSlider.Font = Enum.Font.Gotham
    transSlider.Parent = mainFrame
    Instance.new("UICorner", transSlider).CornerRadius = UDim.new(0, 6)

    local transValue = platformTransparency
    transSlider.MouseButton1Click:Connect(function()
        local input = Instance.new("TextBox")
        input.Size = UDim2.new(0, 100, 0, 30)
        input.Position = UDim2.new(0.5, -50, 0.5, -15)
        input.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
        input.Text = tostring(transValue)
        input.PlaceholderText = "0-1"
        input.TextColor3 = Color3.fromRGB(255, 255, 255)
        input.Font = Enum.Font.Gotham
        input.Parent = mainFrame
        Instance.new("UICorner", input).CornerRadius = UDim.new(0, 6)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0, 60, 0, 30)
        confirm.Position = UDim2.new(0.5, 55, 0.5, -15)
        confirm.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
        confirm.Text = "OK"
        confirm.TextColor3 = Color3.fromRGB(255, 255, 255)
        confirm.Font = Enum.Font.GothamBold
        confirm.Parent = mainFrame
        Instance.new("UICorner", confirm).CornerRadius = UDim.new(0, 6)

        confirm.MouseButton1Click:Connect(function()
            local val = tonumber(input.Text)
            if val and val >= 0 and val <= 1 then
                transValue = val
                platformTransparency = val
                transSlider.Text = tostring(transValue)
                transLabel.Text = "💎 Прозрачность (0-1): " .. transValue
                applyPlatformSettings()
            end
            input:Destroy()
            confirm:Destroy()
        end)
    end)

    yPos = yPos + 55

    local sizeLabel = Instance.new("TextLabel")
    sizeLabel.Size = UDim2.new(0.8, 0, 0, 20)
    sizeLabel.Position = UDim2.new(0.1, 0, 0, yPos)
    sizeLabel.BackgroundTransparency = 1
    sizeLabel.Text = "📏 Размер (ширина/длина): " .. platformSize.X
    sizeLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
    sizeLabel.TextSize = 12
    sizeLabel.Font = Enum.Font.Gotham
    sizeLabel.Parent = mainFrame

    local sizeSlider = Instance.new("TextButton")
    sizeSlider.Size = UDim2.new(0.8, 0, 0, 25)
    sizeSlider.Position = UDim2.new(0.1, 0, 0, yPos + 22)
    sizeSlider.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    sizeSlider.Text = tostring(platformSize.X)
    sizeSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
    sizeSlider.TextSize = 12
    sizeSlider.Font = Enum.Font.Gotham
    sizeSlider.Parent = mainFrame
    Instance.new("UICorner", sizeSlider).CornerRadius = UDim.new(0, 6)

    local sizeValue = platformSize.X
    sizeSlider.MouseButton1Click:Connect(function()
        local input = Instance.new("TextBox")
        input.Size = UDim2.new(0, 100, 0, 30)
        input.Position = UDim2.new(0.5, -50, 0.5, -15)
        input.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
        input.Text = tostring(sizeValue)
        input.PlaceholderText = "1-20"
        input.TextColor3 = Color3.fromRGB(255, 255, 255)
        input.Font = Enum.Font.Gotham
        input.Parent = mainFrame
        Instance.new("UICorner", input).CornerRadius = UDim.new(0, 6)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0, 60, 0, 30)
        confirm.Position = UDim2.new(0.5, 55, 0.5, -15)
        confirm.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
        confirm.Text = "OK"
        confirm.TextColor3 = Color3.fromRGB(255, 255, 255)
        confirm.Font = Enum.Font.GothamBold
        confirm.Parent = mainFrame
        Instance.new("UICorner", confirm).CornerRadius = UDim.new(0, 6)

        confirm.MouseButton1Click:Connect(function()
            local val = tonumber(input.Text)
            if val and val >= 1 and val <= 20 then
                sizeValue = val
                platformSize = Vector3.new(val, 0.5, val)
                sizeSlider.Text = tostring(sizeValue)
                sizeLabel.Text = "📏 Размер (ширина/длина): " .. sizeValue
                applyPlatformSettings()
            end
            input:Destroy()
            confirm:Destroy()
        end)
    end)
end

-- ======================
-- ДАЛЬНИЙ DRAGGER
-- ======================
local draggerActive = false
local draggerGui = nil
local draggerToggleBtn = nil
local currentPart = nil
local att0, att1, alignPos, alignOri = nil, nil, nil, nil
local startDist = 0
local draggerForce = 400000

local function stopDragging()
    if alignPos then alignPos:Destroy() end
    if alignOri then alignOri:Destroy() end
    if att0 then att0:Destroy() end
    if att1 then att1:Destroy() end
    currentPart = nil
end

local function createDraggerGui()
    if draggerGui then draggerGui:Destroy() end
    
    draggerGui = Instance.new("ScreenGui")
    draggerGui.Name = "LongRangeDragger"
    draggerGui.ResetOnSpawn = false
    draggerGui.Parent = game.CoreGui
    
    draggerToggleBtn = Instance.new("TextButton")
    draggerToggleBtn.Size = UDim2.new(0, 160, 0, 50)
    draggerToggleBtn.Position = UDim2.new(0.05, 0, 0.4, 0)
    draggerToggleBtn.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
    draggerToggleBtn.Text = "ДАЛЬНИЙ ГРАБ: ВЫКЛ"
    draggerToggleBtn.TextColor3 = Color3.new(1, 1, 1)
    draggerToggleBtn.Font = Enum.Font.SourceSansBold
    draggerToggleBtn.TextSize = 16
    draggerToggleBtn.Parent = draggerGui
    Instance.new("UICorner", draggerToggleBtn).CornerRadius = UDim.new(0, 8)
    
    draggerToggleBtn.MouseButton1Click:Connect(function()
        draggerActive = not draggerActive
        draggerToggleBtn.Text = draggerActive and "ДАЛЬНИЙ ГРАБ: ВКЛ" or "ДАЛЬНИЙ ГРАБ: ВЫКЛ"
        draggerToggleBtn.BackgroundColor3 = draggerActive and Color3.fromRGB(255, 165, 0) or Color3.fromRGB(35, 35, 35)
        if not draggerActive then stopDragging() end
    end)
    
    local UserInputService = game:GetService("UserInputService")
    local RunService = game:GetService("RunService")
    
    UserInputService.InputBegan:Connect(function(input, processed)
        if processed or not draggerActive then return end
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            local target = mouse.Target
            if target and target:IsA("BasePart") and target.Name ~= "Terrain" then
                local dist = (target.Position - workspace.CurrentCamera.CFrame.Position).Magnitude
                if dist <= 150 and not target:IsDescendantOf(lp.Character) then
                    stopDragging()
                    currentPart = target
                    startDist = dist
                    
                    att0 = Instance.new("Attachment")
                    att0.Parent = currentPart
                    att1 = Instance.new("Attachment")
                    att1.Parent = workspace.Terrain
                    
                    alignPos = Instance.new("AlignPosition")
                    alignPos.Attachment0 = att0
                    alignPos.Attachment1 = att1
                    alignPos.MaxForce = draggerForce
                    alignPos.Responsiveness = 25
                    alignPos.Parent = currentPart
                    
                    alignOri = Instance.new("AlignOrientation")
                    alignOri.Attachment0 = att0
                    alignOri.Attachment1 = att1
                    alignOri.MaxTorque = draggerForce
                    alignOri.Responsiveness = 25
                    alignOri.Parent = currentPart
                end
            end
        end
    end)
    
    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
            stopDragging()
        end
    end)
    
    RunService.RenderStepped:Connect(function()
        if draggerActive and currentPart and att1 then
            currentPart.Anchored = false
            local cam = workspace.CurrentCamera
            local targetPos = cam.CFrame.Position + (cam.CFrame.LookVector * startDist)
            att1.WorldPosition = targetPos
            att1.WorldCFrame = cam.CFrame
            pcall(function()
                currentPart:SetNetworkOwner(lp)
            end)
        end
    end)
end

local function destroyDraggerGui()
    if draggerGui then
        draggerGui:Destroy()
        draggerGui = nil
        draggerToggleBtn = nil
    end
    stopDragging()
    draggerActive = false
end

local function toggleDragger()
    if draggerActive then
        destroyDraggerGui()
        Rayfield:Notify({Title="Dragger", Content="Дальний граб выключен", Duration=2})
    else
        createDraggerGui()
        Rayfield:Notify({Title="Dragger", Content="Дальний граб включён! Кликни на любой блок до 150 studs", Duration=3})
    end
end

-- ======================
-- NOCLIP ФУНКЦИЯ
-- ======================
local noclipActive = false
local noclipConnection = nil

local function toggleNoclip()
    noclipActive = not noclipActive
    
    if noclipActive then
        noclipConnection = game:GetService("RunService").Stepped:Connect(function()
            if lp.Character then
                for _, part in pairs(lp.Character:GetDescendants()) do
                    if part:IsA("BasePart") then
                        part.CanCollide = false
                    end
                end
            end
        end)
        Rayfield:Notify({Title="Noclip", Content="Включён (проходишь сквозь стены)", Duration=2})
    else
        if noclipConnection then
            noclipConnection:Disconnect()
            noclipConnection = nil
        end
        if lp.Character then
            for _, part in pairs(lp.Character:GetDescendants()) do
                if part:IsA("BasePart") then
                    part.CanCollide = true
                end
            end
        end
        Rayfield:Notify({Title="Noclip", Content="Выключен", Duration=2})
    end
end
-- ======================
-- РЕДАКТОР ТЕКСТА/ПЕРЕМЕННЫХ
-- ======================
local function showEditor()
    local editorGui = Instance.new("ScreenGui")
    editorGui.Name = "VariableEditor"
    editorGui.ResetOnSpawn = false
    editorGui.Parent = game.CoreGui

    local mainFrame = Instance.new("Frame")
    mainFrame.Size = UDim2.new(0, 500, 0, 600)
    mainFrame.Position = UDim2.new(0.5, -250, 0.5, -300)
    mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
    mainFrame.BorderSizePixel = 0
    mainFrame.Parent = editorGui
    Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12)

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 35)
    title.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
    title.Text = "✏️ Variable/Text/Label Editor"
    title.TextColor3 = Color3.fromRGB(255, 255, 255)
    title.TextSize = 16
    title.Font = Enum.Font.GothamBold
    title.Parent = mainFrame
    Instance.new("UICorner", title).CornerRadius = UDim.new(0, 12)

    local closeBtn = Instance.new("TextButton")
    closeBtn.Size = UDim2.new(0, 30, 0, 30)
    closeBtn.Position = UDim2.new(1, -35, 0, 2.5)
    closeBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
    closeBtn.Text = "✕"
    closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    closeBtn.TextSize = 18
    closeBtn.Font = Enum.Font.GothamBold
    closeBtn.Parent = title
    Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 6)

    closeBtn.MouseButton1Click:Connect(function()
        editorGui:Destroy()
    end)

    local searchBox = Instance.new("TextBox")
    searchBox.Size = UDim2.new(0.9, 0, 0, 35)
    searchBox.Position = UDim2.new(0.05, 0, 0, 45)
    searchBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    searchBox.PlaceholderText = "🔍 Поиск по названию..."
    searchBox.Text = ""
    searchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
    searchBox.Font = Enum.Font.Gotham
    searchBox.TextSize = 14
    searchBox.Parent = mainFrame
    Instance.new("UICorner", searchBox).CornerRadius = UDim.new(0, 6)

    local scrollFrame = Instance.new("ScrollingFrame")
    scrollFrame.Size = UDim2.new(1, 0, 1, -100)
    scrollFrame.Position = UDim2.new(0, 0, 0, 90)
    scrollFrame.BackgroundTransparency = 1
    scrollFrame.BorderSizePixel = 0
    scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
    scrollFrame.ScrollBarThickness = 6
    scrollFrame.Parent = mainFrame

    local UIList = Instance.new("UIListLayout")
    UIList.Padding = UDim.new(0, 5)
    UIList.SortOrder = Enum.SortOrder.LayoutOrder
    UIList.Parent = scrollFrame

    local refreshBtn = Instance.new("TextButton")
    refreshBtn.Size = UDim2.new(0.2, 0, 0, 30)
    refreshBtn.Position = UDim2.new(0.75, 0, 0, 50)
    refreshBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    refreshBtn.Text = "🔄 Обновить"
    refreshBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    refreshBtn.Font = Enum.Font.GothamBold
    refreshBtn.TextSize = 12
    refreshBtn.Parent = mainFrame
    Instance.new("UICorner", refreshBtn).CornerRadius = UDim.new(0, 6)

    local function updateList(searchText)
        for _, child in pairs(scrollFrame:GetChildren()) do
            if child:IsA("Frame") then
                child:Destroy()
            end
        end

        local objects = {}

        for _, obj in pairs(game:GetDescendants()) do
            if obj:IsA("TextLabel") or obj:IsA("TextBox") or obj:IsA("TextButton") then
                table.insert(objects, obj)
            end
        end

        for _, obj in pairs(game:GetDescendants()) do
            if obj:IsA("StringValue") or obj:IsA("NumberValue") or obj:IsA("BoolValue") or obj:IsA("IntValue") or obj:IsA("ObjectValue") then
                table.insert(objects, obj)
            end
        end

        local yPos = 0
        for _, obj in pairs(objects) do
            local name = obj.Name
            local value = ""
            local objType = ""

            if obj:IsA("TextLabel") or obj:IsA("TextBox") or obj:IsA("TextButton") then
                value = obj.Text
                objType = "📝 Text"
            elseif obj:IsA("StringValue") then
                value = obj.Value
                objType = "🔤 String"
            elseif obj:IsA("NumberValue") then
                value = tostring(obj.Value)
                objType = "#️⃣ Number"
            elseif obj:IsA("IntValue") then
                value = tostring(obj.Value)
                objType = "🔢 Int"
            elseif obj:IsA("BoolValue") then
                value = tostring(obj.Value)
                objType = "✅ Bool"
            elseif obj:IsA("ObjectValue") then
                value = obj.Value and obj.Value.Name or "nil"
                objType = "📦 Object"
            end

            if searchText == "" or string.find(string.lower(name), string.lower(searchText)) or string.find(string.lower(value), string.lower(searchText)) then
                local itemFrame = Instance.new("Frame")
                itemFrame.Size = UDim2.new(1, -10, 0, 60)
                itemFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
                itemFrame.BorderSizePixel = 0
                itemFrame.Parent = scrollFrame
                Instance.new("UICorner", itemFrame).CornerRadius = UDim.new(0, 8)

                local nameLabel = Instance.new("TextLabel")
                nameLabel.Size = UDim2.new(0.4, 0, 0, 20)
                nameLabel.Position = UDim2.new(0.01, 0, 0.05, 0)
                nameLabel.BackgroundTransparency = 1
                nameLabel.Text = name
                nameLabel.TextColor3 = Color3.fromRGB(255, 200, 100)
                nameLabel.TextSize = 12
                nameLabel.Font = Enum.Font.GothamBold
                nameLabel.TextXAlignment = Enum.TextXAlignment.Left
                nameLabel.Parent = itemFrame

                local typeLabel = Instance.new("TextLabel")
                typeLabel.Size = UDim2.new(0.2, 0, 0, 20)
                typeLabel.Position = UDim2.new(0.01, 0, 0.35, 0)
                typeLabel.BackgroundTransparency = 1
                typeLabel.Text = objType
                typeLabel.TextColor3 = Color3.fromRGB(150, 150, 150)
                typeLabel.TextSize = 10
                typeLabel.Font = Enum.Font.Gotham
                typeLabel.TextXAlignment = Enum.TextXAlignment.Left
                typeLabel.Parent = itemFrame

                local pathLabel = Instance.new("TextLabel")
                pathLabel.Size = UDim2.new(0.6, 0, 0, 15)
                pathLabel.Position = UDim2.new(0.01, 0, 0.6, 0)
                pathLabel.BackgroundTransparency = 1
                local path = ""
                local parent = obj.Parent
                local count = 0
                while parent and count < 3 do
                    path = parent.Name .. "/" .. path
                    parent = parent.Parent
                    count = count + 1
                end
                pathLabel.Text = "..." .. path
                pathLabel.TextColor3 = Color3.fromRGB(100, 100, 100)
                pathLabel.TextSize = 9
                pathLabel.Font = Enum.Font.Gotham
                pathLabel.TextXAlignment = Enum.TextXAlignment.Left
                pathLabel.Parent = itemFrame

                local valueBox = Instance.new("TextBox")
                valueBox.Size = UDim2.new(0.4, 0, 0, 35)
                valueBox.Position = UDim2.new(0.58, 0, 0.15, 0)
                valueBox.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
                valueBox.Text = value
                valueBox.TextColor3 = Color3.fromRGB(255, 255, 255)
                valueBox.Font = Enum.Font.Gotham
                valueBox.TextSize = 12
                valueBox.Parent = itemFrame
                Instance.new("UICorner", valueBox).CornerRadius = UDim.new(0, 6)

                local applyBtn = Instance.new("TextButton")
                applyBtn.Size = UDim2.new(0.12, 0, 0, 30)
                applyBtn.Position = UDim2.new(0.86, 0, 0.2, 0)
                applyBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
                applyBtn.Text = "Применить"
                applyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
                applyBtn.Font = Enum.Font.GothamBold
                applyBtn.TextSize = 10
                applyBtn.Parent = itemFrame
                Instance.new("UICorner", applyBtn).CornerRadius = UDim.new(0, 6)

                applyBtn.MouseButton1Click:Connect(function()
                    local success, err = pcall(function()
                        if obj:IsA("TextLabel") or obj:IsA("TextBox") or obj:IsA("TextButton") then
                            obj.Text = valueBox.Text
                        elseif obj:IsA("StringValue") then
                            obj.Value = valueBox.Text
                        elseif obj:IsA("NumberValue") or obj:IsA("IntValue") then
                            obj.Value = tonumber(valueBox.Text) or 0
                        elseif obj:IsA("BoolValue") then
                            obj.Value = valueBox.Text == "true"
                        end
                    end)
                    if success then
                        Rayfield:Notify({Title="Успешно", Content=name .. " изменён на: " .. valueBox.Text, Duration=1})
                    else
                        Rayfield:Notify({Title="Ошибка", Content=err, Duration=2})
                    end
                end)

                itemFrame.LayoutOrder = yPos
                yPos = yPos + 1
            end
        end

        local function updateCanvas()
            local totalHeight = 0
            for _, child in pairs(scrollFrame:GetChildren()) do
                if child:IsA("Frame") and child.Visible then
                    totalHeight = totalHeight + child.AbsoluteSize.Y + UIList.Padding.Offset
                end
            end
            scrollFrame.CanvasSize = UDim2.new(0, 0, 0, totalHeight + 10)
        end

        UIList:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateCanvas)
        task.wait(0.1)
        updateCanvas()
    end

    refreshBtn.MouseButton1Click:Connect(function()
        updateList(searchBox.Text)
    end)

    searchBox:GetPropertyChangedSignal("Text"):Connect(function()
        updateList(searchBox.Text)
    end)

    updateList("")
end

-- ======================
-- КАСТОМНОЕ УПРАВЛЕНИЕ
-- ======================
local function setupCustomControls()
    local Player = lp
    local PlayerGui = Player:WaitForChild("PlayerGui")
    local UserInputService = game:GetService("UserInputService")
    local RunService = game:GetService("RunService")
    local Camera = workspace.CurrentCamera

    if PlayerGui:FindFirstChild("SuperControls") then
        PlayerGui.SuperControls:Destroy()
    end

    local function HideDefaultControls()
        local TouchGui = PlayerGui:FindFirstChild("TouchGui")
        if TouchGui then
            local controlFrame = TouchGui:FindFirstChild("TouchControlFrame")
            if controlFrame then controlFrame.Size = UDim2.new(0, 1, 0, 1) end
            TouchGui.Enabled = false
        end
    end
    HideDefaultControls()
    Player.CharacterAdded:Connect(HideDefaultControls)

    local ScreenGui = Instance.new("ScreenGui")
    ScreenGui.Name = "SuperControls"
    ScreenGui.ResetOnSpawn = false
    ScreenGui.Parent = PlayerGui

    local function applyCircularStripes(instance)
        local clipper = Instance.new("Frame")
        clipper.Name = "Clipper"
        clipper.Size = UDim2.new(1, 0, 1, 0)
        clipper.BackgroundTransparency = 1
        clipper.ClipsDescendants = true
        clipper.Parent = instance

        local corner = Instance.new("UICorner")
        corner.CornerRadius = UDim.new(1, 0)
        corner.Parent = clipper

        local stripeWidth = 1
        local numStripes = 90

        for i = 0, numStripes do
            local stripe = Instance.new("Frame")
            stripe.Size = UDim2.new(0, stripeWidth, 1, 0)
            stripe.Position = UDim2.new(0, i * stripeWidth, 0, 0)
            stripe.BorderSizePixel = 0

            local r = math.random(70, 160) / 255
            local g = math.random(40, 100) / 255
            local b = math.random(20, 60) / 255
            stripe.BackgroundColor3 = Color3.new(r, g, b)
            stripe.Parent = clipper
        end
    end

    local function createRoundBase(name, pos)
        local btn = Instance.new("ImageButton")
        btn.Name = name
        btn.Size = UDim2.new(0, 90, 0, 90)
        btn.Position = pos
        btn.BackgroundColor3 = Color3.fromRGB(120, 75, 28)
        btn.BorderSizePixel = 0
        btn.AutoButtonColor = false

        local corner = Instance.new("UICorner")
        corner.CornerRadius = UDim.new(1, 0)
        corner.Parent = btn

        applyCircularStripes(btn)

        return btn
    end

    local JoyBase = createRoundBase("JoyBase", UDim2.new(0, 50, 1, -250))
    JoyBase.Parent = ScreenGui

    local Stick = Instance.new("Frame", JoyBase)
    Stick.Size = UDim2.new(0, 40, 0, 40)
    Stick.Position = UDim2.new(0.5, -20, 0.5, -20)
    Stick.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    Stick.ZIndex = 3
    Instance.new("UICorner", Stick).CornerRadius = UDim.new(1, 0)

    local JumpBtn = createRoundBase("JumpBtn", UDim2.new(1, -140, 1, -250))
    JumpBtn.Parent = ScreenGui

    local Label = Instance.new("TextLabel", JumpBtn)
    Label.Size = UDim2.new(1, 0, 1, 0)
    Label.BackgroundTransparency = 1
    Label.Text = "прыжок"
    Label.TextColor3 = Color3.new(0, 0, 0)
    Label.Font = Enum.Font.SourceSansBold
    Label.TextSize = 18
    Label.ZIndex = 4

    local moveDir = Vector3.new(0, 0, 0)
    local activeMoveTouch = nil
    local isJumping = false
    local activeTouches = {}
    local lastPinchDist = nil
    local cameraSensitivity = 0.6

    Camera.CameraType = Enum.CameraType.Custom

    JoyBase.InputBegan:Connect(function(input) activeMoveTouch = input end)
    JumpBtn.InputBegan:Connect(function() isJumping = true end)
    JumpBtn.InputEnded:Connect(function() isJumping = false end)

    UserInputService.InputBegan:Connect(function(input, gpe)
        if gpe then return end
        if input.UserInputType == Enum.UserInputType.Touch then
            if input.Position.X > ScreenGui.AbsoluteSize.X / 2 then
                activeTouches[input.Identifier] = input.Position
            end
        end
    end)

    UserInputService.InputChanged:Connect(function(input)
        if input == activeMoveTouch then
            local center = JoyBase.AbsolutePosition + (JoyBase.AbsoluteSize / 2)
            local diff = Vector2.new(input.Position.X, input.Position.Y) - center
            local dist = math.min(diff.Magnitude, 45)
            local dir = diff.Unit
            Stick.Position = UDim2.new(0.5, (dir.X * dist) - 20, 0.5, (dir.Y * dist) - 20)
            moveDir = Vector3.new(dir.X, 0, dir.Y)
        elseif activeTouches[input.Identifier] then
            local oldPos = activeTouches[input.Identifier]
            activeTouches[input.Identifier] = input.Position
            local ids = {}
            for id in pairs(activeTouches) do table.insert(ids, id) end

            if #ids == 1 then
                local delta = input.Position - oldPos
                local rotation = Camera.CFrame.Rotation
                Camera.CFrame = CFrame.new(Camera.CFrame.Position) * CFrame.Angles(0, math.rad(-delta.X * cameraSensitivity), 0) * CFrame.Angles(math.rad(-delta.Y * cameraSensitivity), 0, 0) * rotation
            elseif #ids == 2 then
                local p1 = activeTouches[ids[1]]
                local p2 = activeTouches[ids[2]]
                local currentDist = (p1 - p2).Magnitude
                if lastPinchDist then
                    local deltaZoom = (currentDist - lastPinchDist) * 0.15
                    Player.CameraMaxZoomDistance = math.clamp(Player.CameraMaxZoomDistance - deltaZoom, 0.5, 50)
                    Player.CameraMinZoomDistance = Player.CameraMaxZoomDistance
                end
                lastPinchDist = currentDist
            end
        end
    end)

    UserInputService.InputEnded:Connect(function(input)
        if input == activeMoveTouch then
            activeMoveTouch = nil
            Stick.Position = UDim2.new(0.5, -20, 0.5, -20)
            moveDir = Vector3.new(0, 0, 0)
        end
        activeTouches[input.Identifier] = nil
        if #activeTouches < 2 then lastPinchDist = nil end
    end)

    RunService.RenderStepped:Connect(function()
        local char = Player.Character
        local hum = char and char:FindFirstChild("Humanoid")
        if hum then
            if moveDir.Magnitude > 0 then hum:Move(moveDir, true) end
            hum.Jump = isJumping
        end
    end)

    return ScreenGui
end

local controlsActive = false
local controlsGui = nil

local function enableControls()
    if controlsGui then
        controlsGui:Destroy()
        controlsGui = nil
    end
    controlsGui = setupCustomControls()
    controlsActive = true
    Rayfield:Notify({Title="Управление", Content="Кастомное управление включено", Duration=2})
end

local function disableControls()
    if controlsGui then
        controlsGui:Destroy()
        controlsGui = nil
    end
    local TouchGui = lp.PlayerGui:FindFirstChild("TouchGui")
    if TouchGui then
        local controlFrame = TouchGui:FindFirstChild("TouchControlFrame")
        if controlFrame then
            controlFrame.Size = UDim2.new(1, 0, 1, 0)
        end
        TouchGui.Enabled = true
    end
    controlsActive = false
    Rayfield:Notify({Title="Управление", Content="Кастомное управление выключено", Duration=2})
end

local function respawnPlayer()
    local char = lp.Character
    if char then
        local hum = char:FindFirstChildOfClass("Humanoid")
        if hum then
            hum.Health = 0
        else
            char:Destroy()
        end
    end
    lp.CharacterAdded:Wait()
    Rayfield:Notify({Title="Reset", Content="Игрок перезагружен", Duration=2})
end

-- ======================
-- SIZE CHANGER (изменение размера персонажа)
-- ======================
local sizeChangerGui = nil
local sizeChangerFrame = nil
local sizeInput = nil

local function createSizeChangerGui()
    if sizeChangerGui then sizeChangerGui:Destroy() end
    
    sizeChangerGui = Instance.new("ScreenGui")
    sizeChangerGui.Name = "SizeChanger"
    sizeChangerGui.ResetOnSpawn = false
    sizeChangerGui.Parent = game.CoreGui
    
    local openBtn = Instance.new("TextButton")
    openBtn.Size = UDim2.new(0, 50, 0, 50)
    openBtn.Position = UDim2.new(1, -60, 0, 10)
    openBtn.BackgroundColor3 = Color3.fromRGB(181, 130, 76)
    openBtn.Text = "📏"
    openBtn.Parent = sizeChangerGui
    Instance.new("UICorner", openBtn).CornerRadius = UDim.new(0, 8)
    
    sizeChangerFrame = Instance.new("Frame")
    sizeChangerFrame.Size = UDim2.new(0, 200, 0, 120)
    sizeChangerFrame.Position = UDim2.new(0.5, -100, 0.4, 0)
    sizeChangerFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    sizeChangerFrame.Visible = false
    sizeChangerFrame.Parent = sizeChangerGui
    Instance.new("UICorner", sizeChangerFrame).CornerRadius = UDim.new(0, 12)
    
    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, 0, 0, 30)
    title.BackgroundTransparency = 1
    title.Text = "📏 Изменение размера"
    title.TextColor3 = Color3.fromRGB(255, 255, 255)
    title.TextSize = 14
    title.Font = Enum.Font.GothamBold
    title.Parent = sizeChangerFrame
    
    sizeInput = Instance.new("TextBox")
    sizeInput.Size = UDim2.new(0.8, 0, 0, 40)
    sizeInput.Position = UDim2.new(0.1, 0, 0.3, 0)
    sizeInput.PlaceholderText = "Размер (напр. 0.5)"
    sizeInput.Text = ""
    sizeInput.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
    sizeInput.TextColor3 = Color3.fromRGB(255, 255, 255)
    sizeInput.Parent = sizeChangerFrame
    Instance.new("UICorner", sizeInput).CornerRadius = UDim.new(0, 6)
    
    local applyBtn = Instance.new("TextButton")
    applyBtn.Size = UDim2.new(0.8, 0, 0, 35)
    applyBtn.Position = UDim2.new(0.1, 0, 0.65, 0)
    applyBtn.Text = "ИЗМЕНИТЬ"
    applyBtn.BackgroundColor3 = Color3.fromRGB(181, 130, 76)
    applyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
    applyBtn.Font = Enum.Font.GothamBold
    applyBtn.Parent = sizeChangerFrame
    Instance.new("UICorner", applyBtn).CornerRadius = UDim.new(0, 6)
    
    local function hardResize(scale)
        local char = lp.Character
        if not char then
            Rayfield:Notify({Title="Ошибка", Content="Персонаж не найден", Duration=2})
            return
        end
        
        local root = char:FindFirstChild("HumanoidRootPart")
        if not root then return end
        
        for _, v in pairs(char:GetDescendants()) do
            if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
                v.Size = v.Size * scale
                
                local motor = v:FindFirstChildOfClass("Motor6D") or v.Parent:FindFirstChildOfClass("Motor6D")
                if motor then
                    motor.C0 = motor.C0 + (motor.C0.Position * (scale - 1))
                    motor.C1 = motor.C1 + (motor.C1.Position * (scale - 1))
                end
            end
        end
        
        Rayfield:Notify({Title="Size Changer", Content="Размер изменён на " .. scale, Duration=2})
    end
    
    openBtn.MouseButton1Click:Connect(function()
        sizeChangerFrame.Visible = not sizeChangerFrame.Visible
    end)
    
    applyBtn.MouseButton1Click:Connect(function()
        local val = tonumber(sizeInput.Text)
        if val and val > 0 then
            hardResize(val)
            sizeChangerFrame.Visible = false
            sizeInput.Text = ""
        else
            Rayfield:Notify({Title="Ошибка", Content="Введи число больше 0!", Duration=2})
        end
    end)
end

local function destroySizeChangerGui()
    if sizeChangerGui then
        sizeChangerGui:Destroy()
        sizeChangerGui = nil
    end
end

local function toggleSizeChanger()
    if sizeChangerGui then
        destroySizeChangerGui()
        Rayfield:Notify({Title="Size Changer", Content="Меню размера скрыто", Duration=2})
    else
        createSizeChangerGui()
        Rayfield:Notify({Title="Size Changer", Content="Кнопка 📏 появилась в правом верхнем углу!", Duration=3})
    end
end

-- ======================
-- ВКЛАДКА "907y70"
-- ======================
ControlTab:CreateSection("🎮 Управление игроком")

ControlTab:CreateButton({Name = "🔄 Reset (респавн игрока)", Callback = respawnPlayer})

ControlTab:CreateToggle({
    Name = "🎮 Управление / Нет Управления",
    CurrentValue = false,
    Callback = function(v) if v then enableControls() else disableControls() end end
})

ControlTab:CreateSection("👁️ X-Ray")
ControlTab:CreateButton({Name = "👁️ X-Ray (70% прозрачность)", Callback = toggleXRay})

ControlTab:CreateSection("🪄 Платформа под ногами")
ControlTab:CreateButton({Name = "🟦 Создать платформу", Callback = function() if platform then destroyPlatform() task.wait(0.1) end createPlatform() end})
ControlTab:CreateButton({Name = "⚙️ Настройки платформы", Callback = showPlatformSettings})
ControlTab:CreateButton({Name = "❌ Удалить платформу", Callback = destroyPlatform})

ControlTab:CreateSection("🖱️ Dragger")
ControlTab:CreateButton({Name = "🖱️ Дальний граб (вкл/выкл)", Callback = toggleDragger})
ControlTab:CreateSlider({
    Name = "💪 Сила удержания",
    Range = {0, 1000000},
    Increment = 10000,
    CurrentValue = 400000,
    Callback = function(v)
        draggerForce = v
        if draggerActive and currentPart then
            if alignPos then alignPos.MaxForce = v end
            if alignOri then alignOri.MaxTorque = v end
        end
    end
})

-- НОВАЯ КНОПКА SIZE CHANGER во вкладке 907y70
ControlTab:CreateSection("📏 Размер персонажа")
ControlTab:CreateButton({Name = "📏 Size Changer (изменить размер)", Callback = function()
    toggleSizeChanger()
end})

ControlTab:CreateSection("ℹ️ Информация")
ControlTab:CreateLabel("Reset - перезагружает вашего персонажа")
ControlTab:CreateLabel("Управление - включает кастомный джойстик")
ControlTab:CreateLabel("X-Ray - делает все блоки 70% прозрачными")
ControlTab:CreateLabel("Платформа - создаёт платформу под ногами")
ControlTab:CreateLabel("Квадратные кнопки 20x20 над прыжком")
ControlTab:CreateLabel("▲ Зелёная - зажми для подъёма")
ControlTab:CreateLabel("▼ Красная - зажми для опускания")
ControlTab:CreateLabel("Дальний граб - кликни на блок до 150 studs")
ControlTab:CreateLabel("Сила удержания - насколько сильно блок держится")
ControlTab:CreateLabel("Size Changer - меняет размер персонажа")
-- ======================
-- ВКЛАДКА "tam_aboba228"
-- ======================
local godActive = false
local infJump = false
local speedVal = 0
local puppet = nil
local pdtko_cf = nil
local vbdtki_part = nil
local scanLoop = nil
local isTeleporting = false

-- ======================
-- SAVE INVENTORY (сохранение предметов при респавне)
-- ======================
local saveInventoryActive = false
local savedTools = {}

local function saveCurrentInventory()
    savedTools = {}
    local backpack = lp:FindFirstChild("Backpack")
    local character = lp.Character
    
    if backpack then
        for _, tool in pairs(backpack:GetChildren()) do
            if tool:IsA("Tool") then
                local clone = tool:Clone()
                clone.Parent = nil
                table.insert(savedTools, clone)
            end
        end
    end
    
    if character then
        for _, tool in pairs(character:GetChildren()) do
            if tool:IsA("Tool") then
                local clone = tool:Clone()
                clone.Parent = nil
                table.insert(savedTools, clone)
            end
        end
    end
    
    if #savedTools > 0 then
        Rayfield:Notify({Title="Inventory Saved", Content="Сохранено " .. #savedTools .. " предметов", Duration=2})
    end
end

local function restoreInventory()
    if not saveInventoryActive then return end
    
    local backpack = lp:FindFirstChild("Backpack")
    if not backpack then return end
    
    for _, tool in pairs(backpack:GetChildren()) do
        if tool:IsA("Tool") then
            tool:Destroy()
        end
    end
    
    local restoredCount = 0
    for _, savedTool in pairs(savedTools) do
        if savedTool and savedTool:IsA("Tool") then
            local newTool = savedTool:Clone()
            newTool.Parent = backpack
            restoredCount = restoredCount + 1
        end
    end
    
    if restoredCount > 0 then
        Rayfield:Notify({Title="Inventory Restored", Content="Восстановлено " .. restoredCount .. " предметов", Duration=2})
    end
end

lp.CharacterAdded:Connect(function()
    task.wait(0.5)
    restoreInventory()
end)

-- ======================
-- ОСТАЛЬНЫЕ ФУНКЦИИ
-- ======================
local function isValidEnemy(part, trapPart)
    if part == trapPart or part:IsA("Terrain") then return false end
    if part.Anchored and not part.Parent:FindFirstChildOfClass("Humanoid") then return false end
    if part:IsDescendantOf(lp.Character) then return false end
    if puppet and part:IsDescendantOf(puppet) then return false end
    local player = game.Players:GetPlayerFromCharacter(part.Parent)
    if player == lp then return false end
    return true
end

local function selectObj(callback)
    local conn
    conn = mouse.Button1Down:Connect(function()
        if mouse.Target and not mouse.Target:IsA("Terrain") then
            callback(mouse.Target)
            conn:Disconnect()
        end
    end)
end

local function applyHighlight(part, color)
    for _, v in pairs(part:GetChildren()) do
        if v.Name == "GeminiBox" then v:Destroy() end
    end
    local box = Instance.new("SelectionBox")
    box.Name = "GeminiBox"
    box.Adornee = part
    box.Color3 = color
    box.LineThickness = 0.08
    box.SurfaceTransparency = 0.6
    box.SurfaceColor3 = color
    box.Parent = part
end

local function teleport(cf)
    if not cf or isTeleporting then return end
    isTeleporting = true
    local root = lp.Character:FindFirstChild("HumanoidRootPart")
    if root then
        root.AssemblyLinearVelocity = Vector3.zero
        lp.Character:SetPrimaryPartCFrame(cf * CFrame.new(0, 5, 0))
    end
    task.wait(1)
    isTeleporting = false
end

local function startGhost()
    local char = lp.Character
    char.Archivable = true
    puppet = char:Clone()
    puppet.Name = "Turbo_Ghost"
    puppet.Parent = workspace
    for _, v in pairs(puppet:GetDescendants()) do
        if v:IsA("BasePart") then v.Transparency = 0.5; v.CanCollide = false end
    end
    local weld = Instance.new("WeldConstraint", puppet.HumanoidRootPart)
    weld.Part0 = puppet.HumanoidRootPart
    weld.Part1 = char.HumanoidRootPart
    for _, v in pairs(char:GetChildren()) do
        if v:IsA("BasePart") then v.Transparency = 1 end
        if v:IsA("Accessory") then v.Handle.Transparency = 1 end
    end
    workspace.CurrentCamera.CameraSubject = puppet:FindFirstChild("Humanoid")
end

local flyActive = false
local flyConn = nil
local flyBody = nil

local function startFly()
    local char = lp.Character
    local root = char:FindFirstChild("HumanoidRootPart")
    if not root then return end
    local hum = char:FindFirstChildOfClass("Humanoid")
    hum.PlatformStand = true
    local gyro = Instance.new("BodyGyro")
    gyro.Name = "FlyGyro"
    gyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
    gyro.P = 9e4
    gyro.CFrame = root.CFrame
    gyro.Parent = root
    local vel = Instance.new("BodyVelocity")
    vel.Name = "FlyVel"
    vel.MaxForce = Vector3.new(9e9, 9e9, 9e9)
    vel.Velocity = Vector3.zero
    vel.Parent = root
    flyBody = {gyro = gyro, vel = vel}
    local cam = workspace.CurrentCamera
    local flySpeed = 40
    flyConn = game:GetService("RunService").Heartbeat:Connect(function()
        if not flyActive then return end
        local camCF = cam.CFrame
        local hum2 = char:FindFirstChildOfClass("Humanoid")
        if hum2 and hum2.MoveDirection.Magnitude > 0 then
            vel.Velocity = camCF.LookVector * flySpeed
        else
            vel.Velocity = Vector3.zero
        end
        gyro.CFrame = camCF
    end)
end

local function stopFly()
    if flyConn then flyConn:Disconnect(); flyConn = nil end
    if flyBody then flyBody.gyro:Destroy(); flyBody.vel:Destroy(); flyBody = nil end
    local char = lp.Character
    if char then
        local hum = char:FindFirstChildOfClass("Humanoid")
        if hum then hum.PlatformStand = false end
    end
end

local tpTool = nil
local function createTpTool()
    if tpTool then tpTool:Destroy() end
    tpTool = Instance.new("Tool")
    tpTool.Name = "TpTool"
    tpTool.RequiresHandle = false
    tpTool.ToolTip = "Нажми чтобы телепортироваться"
    local handle = Instance.new("Part")
    handle.Name = "Handle"
    handle.Size = Vector3.new(1,1,1)
    handle.Transparency = 1
    handle.CanCollide = false
    handle.Parent = tpTool
    tpTool.Activated:Connect(function()
        local unitRay = workspace.CurrentCamera:ScreenPointToRay(mouse.X, mouse.Y)
        local result = workspace:Raycast(unitRay.Origin, unitRay.Direction * 1000, RaycastParams.new())
        if result then
            lp.Character:SetPrimaryPartCFrame(CFrame.new(result.Position + Vector3.new(0,3,0)))
        end
    end)
    tpTool.Parent = lp.Backpack
    Rayfield:Notify({Title="Tp Tool", Content="Инструмент добавлен в инвентарь", Duration=2})
end

-- ======================
-- WALLHOP ФУНКЦИЯ
-- ======================
local wallhopActive = false
local wallhopConnection = nil
local wallhopLastJump = 0
local wallhopCooldown = 0.25

local function isTouchingWall()
    local char = lp.Character
    if not char then return false end
    local root = char:FindFirstChild("HumanoidRootPart")
    local hum = char:FindFirstChildOfClass("Humanoid")
    if not root or not hum then return false end
    
    local moveDir = hum.MoveDirection
    if moveDir.Magnitude < 0.3 then return false end
    
    local horizontalDir = Vector3.new(moveDir.X, 0, moveDir.Z).Unit
    local rootPos = root.Position
    
    local heights = {1.2, 0.8, 0.4}
    local hitCount = 0
    
    for _, height in ipairs(heights) do
        local rayOrigin = rootPos + Vector3.new(0, height, 0)
        local rayDirection = horizontalDir * 1.8
        
        local params = RaycastParams.new()
        params.FilterType = Enum.RaycastFilterType.Blacklist
        params.FilterDescendantsInstances = {char}
        
        local result = workspace:Raycast(rayOrigin, rayDirection, params)
        if result and result.Instance.CanCollide then
            local dist = (result.Position - rayOrigin).Magnitude
            if dist <= 1.5 and math.abs(result.Normal.Y) < 0.3 then
                hitCount = hitCount + 1
            end
        end
    end
    
    return hitCount >= 2
end

local function isFalling()
    local char = lp.Character
    if not char then return false end
    local root = char:FindFirstChild("HumanoidRootPart")
    if not root then return false end
    local vel = root.AssemblyLinearVelocity
    return vel.Y < -5
end

local function isReallyInAir()
    local char = lp.Character
    if not char then return false end
    local hum = char:FindFirstChildOfClass("Humanoid")
    if not hum then return false end
    local state = hum:GetState()
    
    if state == Enum.HumanoidStateType.Landed or state == Enum.HumanoidStateType.Running then
        return false
    end
    
    if state == Enum.HumanoidStateType.Jumping or 
       state == Enum.HumanoidStateType.Freefall or
       state == Enum.HumanoidStateType.FallingDown then
        
        local root = char:FindFirstChild("HumanoidRootPart")
        if root then
            local rayOrigin = root.Position - Vector3.new(0, 2.2, 0)
            local params = RaycastParams.new()
            params.FilterType = Enum.RaycastFilterType.Blacklist
            params.FilterDescendantsInstances = {char}
            local result = workspace:Raycast(rayOrigin, Vector3.new(0, -0.3, 0), params)
            if result and (result.Position - rayOrigin).Magnitude < 0.5 then
                return false
            end
        end
        return true
    end
    
    return false
end

local function canWallhop()
    if tick() - wallhopLastJump < wallhopCooldown then return false end
    if not isReallyInAir() then return false end
    if not isFalling() then return false end
    return isTouchingWall()
end

local function startWallhop()
    if wallhopConnection then wallhopConnection:Disconnect() end
    wallhopConnection = game:GetService("RunService").Heartbeat:Connect(function()
        if not wallhopActive then return end
        local char = lp.Character
        if not char or not char.Parent then return end
        local hum = char:FindFirstChildOfClass("Humanoid")
        if not hum or hum.Health <= 0 then return end
        
        if canWallhop() then
            hum:ChangeState(Enum.HumanoidStateType.Jumping)
            wallhopLastJump = tick()
        end
    end)
end

local function stopWallhop()
    if wallhopConnection then
        wallhopConnection:Disconnect()
        wallhopConnection = nil
    end
end

-- ======================
-- ОСНОВНЫЕ КНОПКИ ВКЛАДКИ tam_aboba228
-- ======================
game:GetService("RunService").Stepped:Connect(function()
    if lp.Character and lp.Character:FindFirstChild("HumanoidRootPart") then
        local hum = lp.Character:FindFirstChildOfClass("Humanoid")
        if speedVal > 0 and hum.MoveDirection.Magnitude > 0 then
            lp.Character.HumanoidRootPart.CFrame = lp.Character.HumanoidRootPart.CFrame + (hum.MoveDirection * speedVal/100)
        end
        if godActive and hum then hum.Health = 100 end
    end
end)

MainTab:CreateToggle({Name="Activate Ghost Mode", CurrentValue=false, Callback=function(v) if v then startGhost() else if puppet then puppet:Destroy() end workspace.CurrentCamera.CameraSubject = lp.Character:FindFirstChild("Humanoid") for _, x in pairs(lp.Character:GetChildren()) do if x:IsA("BasePart") then x.Transparency = 0 end if x:IsA("Accessory") then x.Handle.Transparency = 0 end end end end})
MainTab:CreateToggle({Name="Godmode", CurrentValue=false, Callback=function(v) godActive=v end})
MainTab:CreateToggle({Name="Infinite Jump", CurrentValue=false, Callback=function(v) infJump=v end})
MainTab:CreateToggle({Name="Noclip (проход сквозь стены)", CurrentValue=false, Callback=function(v) if v then toggleNoclip() else if noclipActive then toggleNoclip() end end end})
MainTab:CreateButton({Name="✏️ Variable/Text/Label Editor", Callback=showEditor})

game:GetService("UserInputService").JumpRequest:Connect(function()
    if infJump and lp.Character:FindFirstChildOfClass("Humanoid") then
        lp.Character:FindFirstChildOfClass("Humanoid"):ChangeState(3)
    end
end)

MainTab:CreateSlider({Name="Speed", Range={0,300}, Increment=5, CurrentValue=0, Callback=function(v) speedVal=v end})
MainTab:CreateToggle({Name="Fly / Unfly", CurrentValue=false, Callback=function(v) flyActive=v if v then startFly() Rayfield:Notify({Title="Fly ON", Content="Двигай джойстик — летишь куда смотрит камера", Duration=3}) else stopFly() Rayfield:Notify({Title="Fly OFF", Content="Полёт отключён", Duration=2}) end end})

-- КНОПКА SAVE INVENTORY
MainTab:CreateToggle({Name="💾 Save Inventory (сохранять предметы при респавне)", CurrentValue=false, Callback=function(v)
    saveInventoryActive = v
    if v then
        saveCurrentInventory()
        Rayfield:Notify({Title="Save Inventory ON", Content="Предметы будут сохраняться при респавне!", Duration=3})
    else
        savedTools = {}
        Rayfield:Notify({Title="Save Inventory OFF", Content="Сохранение предметов выключено", Duration=2})
    end
end})

-- КНОПКА WALLHOP
MainTab:CreateToggle({Name="🧱 WallHop (отскок от стен)", CurrentValue=false, Callback=function(v) 
    wallhopActive = v
    if v then
        startWallhop()
        Rayfield:Notify({Title="WallHop ON", Content="Отскакивай от стен в воздухе!", Duration=2})
    else
        stopWallhop()
        Rayfield:Notify({Title="WallHop OFF", Content="WallHop выключен", Duration=2})
    end
end})

MainTab:CreateToggle({Name="Instant Interaction", CurrentValue=false, Callback=function(v) local function applyToPrompt(pp) if v then pp.HoldDuration=0.001; pp.MaxActivationDistance=50 else pp.HoldDuration=1; pp.MaxActivationDistance=10 end end for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("ProximityPrompt") then applyToPrompt(obj) end end if v then workspace.DescendantAdded:Connect(function(obj) if obj:IsA("ProximityPrompt") then applyToPrompt(obj) end end) end end})
MainTab:CreateToggle({Name="No Fog", CurrentValue=false, Callback=function(v) local lighting = game:GetService("Lighting") if v then lighting.FogEnd=1e6; lighting.FogStart=1e6 local atm=lighting:FindFirstChildOfClass("Atmosphere") if atm then atm.Density=0 end else lighting.FogEnd=100000; lighting.FogStart=0 local atm=lighting:FindFirstChildOfClass("Atmosphere") if atm then atm.Density=0.395 end end end})

local isDaytime = true
MainTab:CreateButton({Name="Day/Night (переключить)", Callback=function() local lighting=game:GetService("Lighting") isDaytime=not isDaytime if isDaytime then lighting.TimeOfDay="12:00:00"; lighting.Brightness=2 lighting.Ambient=Color3.fromRGB(128,128,128) lighting.OutdoorAmbient=Color3.fromRGB(128,128,128) Rayfield:Notify({Title="День", Content="Скайбокс переключён на день", Duration=1.5}) else lighting.TimeOfDay="00:00:00"; lighting.Brightness=0 lighting.Ambient=Color3.fromRGB(10,10,30) lighting.OutdoorAmbient=Color3.fromRGB(10,10,30) Rayfield:Notify({Title="Ночь", Content="Скайбокс переключён на ночь", Duration=1.5}) end end})
MainTab:CreateButton({Name="Tp Tool (выдать инструмент)", Callback=function() createTpTool() end})
    -- Lag Switch
    local lagActive = false
    local frozenParts = {}
    local LAG_RADIUS = 2.5
    local function freezeWorld(enable)
        local char = lp.Character
        local root = char and char:FindFirstChild("HumanoidRootPart")
        if not root then return end
        if enable then
            frozenParts = {}
            for _, obj in pairs(workspace:GetDescendants()) do
                if obj:IsA("BasePart") and not obj.Anchored then
                    if obj:IsDescendantOf(char) then continue end
                    local dist = (obj.Position - root.Position).Magnitude
                    if dist > LAG_RADIUS then
                        local info = { part = obj, velocity = obj.AssemblyLinearVelocity, angularVelocity = obj.AssemblyAngularVelocity }
                        obj.AssemblyLinearVelocity = Vector3.zero
                        obj.AssemblyAngularVelocity = Vector3.zero
                        obj.Anchored = true
                        table.insert(frozenParts, info)
                    end
                end
            end
        else
            for _, info in pairs(frozenParts) do
                if info.part and info.part.Parent then
                    info.part.Anchored = false
                    info.part.AssemblyLinearVelocity = info.velocity
                    info.part.AssemblyAngularVelocity = info.angularVelocity
                end
            end
            frozenParts = {}
        end
    end
    MainTab:CreateToggle({Name="❄️ Lag Switch", CurrentValue=false, Callback=function(v) lagActive=v freezeWorld(v) if v then Rayfield:Notify({Title="Lag Switch ON", Content="Объекты дальше 2.5 studs заморожены", Duration=2}) else Rayfield:Notify({Title="Lag Switch OFF", Content="Объекты разморожены", Duration=2}) end end})

    -- Дюпликатор
    MainTab:CreateButton({Name="🔁 Дублировать предмет в руках", Callback=function() local char = lp.Character if not char then Rayfield:Notify({Title="Ошибка", Content="Персонаж не найден", Duration=2}) return end local tool = char:FindFirstChildOfClass("Tool") if not tool then Rayfield:Notify({Title="Ошибка", Content="Возьми предмет в руки!", Duration=2}) return end local clone = tool:Clone() clone.Parent = lp.Backpack Rayfield:Notify({Title="Дублировано!", Content="Предмет «" .. tool.Name .. "» скопирован в инвентарь", Duration=3}) end})

    -- Замечание
    MainTab:CreateSection("Замечание")
    MainTab:CreateButton({Name="ПДТКО (СИНЯЯ - БАЗА)", Callback=function() Rayfield:Notify({Title="Выбор", Content="Кликни по безопасному блоку", Duration=2}) selectObj(function(part) pdtko_cf=part.CFrame applyHighlight(part, Color3.fromRGB(0,255,255)) end) end})
    MainTab:CreateButton({Name="ВБДТКИ (КРАСНАЯ - ЛОВУШКА)", Callback=function() if not pdtko_cf then Rayfield:Notify({Title="Ошибка", Content="Сначала выбери базу (ПДТКО)", Duration=2}) return end Rayfield:Notify({Title="Выбор", Content="Кликни по блоку-приманке", Duration=2}) selectObj(function(part) vbdtki_part=part applyHighlight(part, Color3.fromRGB(255,0,0)) if scanLoop then scanLoop:Disconnect() end scanLoop=game:GetService("RunService").Heartbeat:Connect(function() if vbdtki_part and pdtko_cf and not isTeleporting then local parts=workspace:GetPartBoundsInBox(vbdtki_part.CFrame, vbdtki_part.Size) for _, p in pairs(parts) do if isValidEnemy(p, vbdtki_part) then teleport(pdtko_cf) Rayfield:Notify({Title="Сработало!", Content="Детектор засек движение", Duration=1}) break end end end end) end) end})
    MainTab:CreateButton({Name="Отключить Замечание", Callback=function() if scanLoop then scanLoop:Disconnect(); scanLoop=nil end vbdtki_part=nil; pdtko_cf=nil for _, v in pairs(workspace:GetDescendants()) do if v.Name=="GeminiBox" then v:Destroy() end end Rayfield:Notify({Title="Отключено", Content="Замечание выключено", Duration=2}) end})
    MainTab:CreateButton({Name="Тест (Заспавнить Dummy)", Callback=function() local t=Instance.new("Part", workspace) t.Size=Vector3.new(3,3,3) t.CFrame=lp.Character.HumanoidRootPart.CFrame t.Transparency=0.5 t.CanCollide=false t.Anchored=false t.BrickColor=BrickColor.new("Bright red") task.wait(2) t:Destroy() end})

    -- Вкладка Админ
    if lp.UserId == OWNER_ID then
        local AdminTab = Window:CreateTab("👑 Админ", 4483362458)
        AdminTab:CreateSection("📌 Информация")
        AdminTab:CreateLabel("Ключ: TAM228 или 907Y70 (50/50)")
        AdminTab:CreateLabel("Для смены ключа измени в скрипте")
        AdminTab:CreateLabel("строки: local KEY1 = 'TAM228', local KEY2 = '907Y70'")
    end
end

-- ======================
-- ОКНО ВВОДА КЛЮЧА
-- ======================
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "KeySystem"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = game.CoreGui

local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(0, 320, 0, 200)
Frame.Position = UDim2.new(0.5, -160, 0.5, -100)
Frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Frame.BorderSizePixel = 0
Frame.Parent = ScreenGui
Instance.new("UICorner", Frame).CornerRadius = UDim.new(0, 12)

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 40)
Title.BackgroundTransparency = 1
Title.Text = "🔑 Введи ключ"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 20
Title.Font = Enum.Font.GothamBold
Title.Parent = Frame

local SubTitle = Instance.new("TextLabel")
SubTitle.Size = UDim2.new(1, 0, 0, 25)
SubTitle.Position = UDim2.new(0, 0, 0, 38)
SubTitle.BackgroundTransparency = 1
SubTitle.Text = "By tam_aboba228 & 907y70"
SubTitle.TextColor3 = Color3.fromRGB(150, 150, 150)
SubTitle.TextSize = 13
SubTitle.Font = Enum.Font.Gotham
SubTitle.Parent = Frame

local InputBox = Instance.new("TextBox")
InputBox.Size = UDim2.new(0.85, 0, 0, 40)
InputBox.Position = UDim2.new(0.075, 0, 0, 75)
InputBox.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
InputBox.BorderSizePixel = 0
InputBox.Text = ""
InputBox.PlaceholderText = "Введи ключ..."
InputBox.TextColor3 = Color3.fromRGB(255, 255, 255)
InputBox.PlaceholderColor3 = Color3.fromRGB(100, 100, 100)
InputBox.TextSize = 16
InputBox.Font = Enum.Font.Gotham
InputBox.ClearTextOnFocus = true
InputBox.Parent = Frame
Instance.new("UICorner", InputBox).CornerRadius = UDim.new(0, 8)

local ConfirmBtn = Instance.new("TextButton")
ConfirmBtn.Size = UDim2.new(0.85, 0, 0, 35)
ConfirmBtn.Position = UDim2.new(0.075, 0, 0, 125)
ConfirmBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
ConfirmBtn.BorderSizePixel = 0
ConfirmBtn.Text = "Подтвердить"
ConfirmBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ConfirmBtn.TextSize = 15
ConfirmBtn.Font = Enum.Font.GothamBold
ConfirmBtn.Parent = Frame
Instance.new("UICorner", ConfirmBtn).CornerRadius = UDim.new(0, 8)

local StatusLabel = Instance.new("TextLabel")
StatusLabel.Size = UDim2.new(1, 0, 0, 20)
StatusLabel.Position = UDim2.new(0, 0, 1, 5)
StatusLabel.BackgroundTransparency = 1
StatusLabel.Text = ""
StatusLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
StatusLabel.TextSize = 13
StatusLabel.Font = Enum.Font.Gotham
StatusLabel.Parent = Frame

ConfirmBtn.MouseButton1Click:Connect(function()
    local enteredKey = InputBox.Text
    
    if enteredKey ~= "" then
        StatusLabel.TextColor3 = Color3.fromRGB(80, 255, 80)
        StatusLabel.Text = "✅ Ключ принят! Загрузка..."
        task.wait(1)
        ScreenGui:Destroy()
        loadMenu()
    else
        StatusLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
        StatusLabel.Text = "❌ Введи любой ключ!"
    end
end)

Features & Information

Speed hack, ghost mode, godmode, A LOT.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts