Загрузка данных


local UIS, Players, RS, WS = game:GetService("UserInputService"), game:GetService("Players"), game:GetService("RunService"), game:GetService("Workspace")
local LP, Cam = Players.LocalPlayer, WS.CurrentCamera

if _G.TestScriptUI then pcall(function() _G.TestScriptUI:Destroy() end) pcall(function() _G.FOVCircle:Remove() end) end

local S = {Aimbot=false, TargetLook=false, WallCheck=false, ESP=false, BHop=false, FOV=150, Smoothness=5, AutoPlay=false, UIToggleKey=Enum.KeyCode.RightShift, AimbotKey=Enum.KeyCode.E, TargetLookKey=Enum.KeyCode.Q, BHopKey=Enum.KeyCode.B, BHopMaxSpeed=35}
local BHop = {Base=16, Cur=16, Gain=2, LastJump=0, InAir=false}

local FOV = Drawing.new("Circle")
FOV.Position, FOV.Radius, FOV.Color, FOV.Thickness, FOV.Filled, FOV.Visible = Vector2.new(Cam.ViewportSize.X/2, Cam.ViewportSize.Y/2), S.FOV, Color3.fromRGB(255,255,255), 1, false, false
_G.FOVCircle = FOV

local Gui = Instance.new("ScreenGui")
Gui.Name, Gui.ResetOnSpawn = "CleanUI_Protected", false
local pOK = pcall(function() Gui.Parent = gethui and gethui() or game:GetService("CoreGui") end)
if not pOK then Gui.Parent = LP:WaitForChild("PlayerGui") end
_G.TestScriptUI = Gui

local function AddCorner(o, r) local c = Instance.new("UICorner", o) c.CornerRadius = UDim.new(0, r or 8) return c end

local Main = Instance.new("Frame", Gui)
Main.Size, Main.Position, Main.BackgroundColor3, Main.BorderSizePixel, Main.Active, Main.Draggable = UDim2.new(0, 320, 0, 520), UDim2.new(0.5, -160, 0.5, -260), Color3.fromRGB(18,18,22), 0, true, true
AddCorner(Main, 12)
local Stroke = Instance.new("UIStroke", Main) Stroke.Color, Stroke.Thickness = Color3.fromRGB(45,45,55), 1.5

local OpenBtn = Instance.new("TextButton", Gui)
OpenBtn.Size, OpenBtn.Position, OpenBtn.BackgroundColor3, OpenBtn.Text, OpenBtn.Font, OpenBtn.TextSize, OpenBtn.TextColor3, OpenBtn.Visible = UDim2.new(0, 110, 0, 28), UDim2.new(0.5, -55, 0, 15), Color3.fromRGB(25,25,32), "Open Script", Enum.Font.GothamBold, 11, Color3.fromRGB(220,220,240), false
AddCorner(OpenBtn, 14)
local OStroke = Instance.new("UIStroke", OpenBtn) OStroke.Color, OStroke.Thickness = Color3.fromRGB(70,70,90), 1.2

local Header = Instance.new("Frame", Main) Header.Size, Header.BackgroundTransparency = UDim2.new(1,0,0,45), 1
local Title = Instance.new("TextLabel", Header) Title.Size, Title.Position, Title.Text, Title.Font, Title.TextSize, Title.TextColor3, Title.TextXAlignment, Title.BackgroundTransparency = UDim2.new(1,-80,0,22), UDim2.new(0,10,0,6), "TEST ENVIRONMENT", Enum.Font.GothamBold, 13, Color3.fromRGB(240,240,245), Enum.TextXAlignment.Left, 1
local Sub = Instance.new("TextLabel", Header) Sub.Size, Sub.Position, Sub.Text, Sub.Font, Sub.TextSize, Sub.TextColor3, Sub.TextXAlignment, Sub.BackgroundTransparency = UDim2.new(1,-80,0,14), UDim2.new(0,10,0,25), "Private Cheat Suite", Enum.Font.Gotham, 10, Color3.fromRGB(110,110,130), Enum.TextXAlignment.Left, 1

local MinBtn = Instance.new("TextButton", Header) MinBtn.Size, MinBtn.Position, MinBtn.BackgroundColor3, MinBtn.Text, MinBtn.Font, MinBtn.TextSize, MinBtn.TextColor3 = UDim2.new(0,22,0,22), UDim2.new(1,-54,0,10), Color3.fromRGB(35,35,45), "-", Enum.Font.GothamBold, 14, Color3.fromRGB(200,200,220)
AddCorner(MinBtn, 11)
local CloseBtn = Instance.new("TextButton", Header) CloseBtn.Size, CloseBtn.Position, CloseBtn.BackgroundColor3, CloseBtn.Text, CloseBtn.Font, CloseBtn.TextSize, CloseBtn.TextColor3 = UDim2.new(0,22,0,22), UDim2.new(1,-28,0,10), Color3.fromRGB(160,45,45), "×", Enum.Font.GothamBold, 16, Color3.fromRGB(255,255,255)
AddCorner(CloseBtn, 11)

MinBtn.MouseButton1Click:Connect(function() Main.Visible, OpenBtn.Visible = false, true end)
OpenBtn.MouseButton1Click:Connect(function() Main.Visible, OpenBtn.Visible = true, false end)
CloseBtn.MouseButton1Click:Connect(function() Gui:Destroy() FOV:Remove() end)

local Scroll = Instance.new("ScrollingFrame", Main) Scroll.Size, Scroll.Position, Scroll.BackgroundTransparency, Scroll.ScrollBarThickness, Scroll.ScrollBarImageColor3, Scroll.CanvasSize = UDim2.new(1,-16,1,-55), UDim2.new(0,8,0,48), 1, 2, Color3.fromRGB(60,60,75), UDim2.new(0,0,0,720)
local Layout = Instance.new("UIListLayout", Scroll) Layout.Padding = UDim.new(0,7)

local UIEl = {}

local function CreateToggle(tText, dText, key)
    local f = Instance.new("Frame", Scroll) f.Size, f.BackgroundColor3 = UDim2.new(1,0,0,42), Color3.fromRGB(26,26,32) AddCorner(f,8)
    local btn = Instance.new("TextButton", f) btn.Size, btn.BackgroundTransparency, btn.Text = UDim2.new(1,0,1,0), 1, ""
    local t = Instance.new("TextLabel", f) t.Size, t.Position, t.Text, t.Font, t.TextSize, t.TextColor3, t.TextXAlignment, t.BackgroundTransparency = UDim2.new(1,-60,0,20), UDim2.new(0,10,0,4), tText, Enum.Font.GothamSemibold, 12, Color3.fromRGB(230,230,230), Enum.TextXAlignment.Left, 1
    local d = Instance.new("TextLabel", f) d.Size, d.Position, d.Text, d.Font, d.TextSize, d.TextColor3, d.TextXAlignment, d.BackgroundTransparency = UDim2.new(1,-60,0,14), UDim2.new(0,10,0,22), dText, Enum.Font.Gotham, 9, Color3.fromRGB(110,110,130), Enum.TextXAlignment.Left, 1
    
    local ind = Instance.new("Frame", f) ind.Size, ind.Position, ind.BackgroundColor3 = UDim2.new(0,36,0,18), UDim2.new(1,-44,0.5,-9), S[key] and Color3.fromRGB(60,160,90) or Color3.fromRGB(45,45,55) AddCorner(ind,9)
    local st = Instance.new("TextLabel", ind) st.Size, st.Text, st.Font, st.TextSize, st.TextColor3, st.BackgroundTransparency = UDim2.new(1,0,1,0), S[key] and "ON" or "OFF", Enum.Font.GothamBold, 9, Color3.fromRGB(255,255,255), 1
    UIEl[key] = {Ind=ind, Text=st}

    btn.MouseButton1Click:Connect(function()
        S[key] = not S[key]
        st.Text = S[key] and "ON" or "OFF"
        ind.BackgroundColor3 = S[key] and Color3.fromRGB(60,160,90) or Color3.fromRGB(45,45,55)
        if key == "BHop" and S.BHop then
            pcall(function()
                local h = LP.Character and LP.Character:FindFirstChildOfClass("Humanoid")
                if h then BHop.Base = h.WalkSpeed BHop.Cur = h.WalkSpeed end
            end)
        end
    end)
end

local function CreateKeybind(tText, dText, key)
    local f = Instance.new("Frame", Scroll) f.Size, f.BackgroundColor3 = UDim2.new(1,0,0,42), Color3.fromRGB(26,26,32) AddCorner(f,8)
    local t = Instance.new("TextLabel", f) t.Size, t.Position, t.Text, t.Font, t.TextSize, t.TextColor3, t.TextXAlignment, t.BackgroundTransparency = UDim2.new(1,-90,0,20), UDim2.new(0,10,0,4), tText, Enum.Font.GothamSemibold, 12, Color3.fromRGB(230,230,230), Enum.TextXAlignment.Left, 1
    local d = Instance.new("TextLabel", f) d.Size, d.Position, d.Text, d.Font, d.TextSize, d.TextColor3, d.TextXAlignment, d.BackgroundTransparency = UDim2.new(1,-90,0,14), UDim2.new(0,10,0,22), dText, Enum.Font.Gotham, 9, Color3.fromRGB(110,110,130), Enum.TextXAlignment.Left, 1
    local kBtn = Instance.new("TextButton", f) kBtn.Size, kBtn.Position, kBtn.BackgroundColor3, kBtn.Text, kBtn.Font, kBtn.TextSize, kBtn.TextColor3 = UDim2.new(0,75,0,22), UDim2.new(1,-83,0.5,-11), Color3.fromRGB(38,38,48), "["..S[key].Name.."]", Enum.Font.GothamBold, 10, Color3.fromRGB(180,180,200) AddCorner(kBtn, 5)

    local binding = false
    kBtn.MouseButton1Click:Connect(function() binding = true kBtn.Text = "..." end)
    UIS.InputBegan:Connect(function(input)
        if binding and input.UserInputType == Enum.UserInputType.Keyboard then S[key] = input.KeyCode kBtn.Text = "["..input.KeyCode.Name.."]" binding = false end
    end)
end

local function CreateSlider(tText, dText, min, max, def, key)
    local f = Instance.new("Frame", Scroll) f.Size, f.BackgroundColor3 = UDim2.new(1,0,0,48), Color3.fromRGB(26,26,32) AddCorner(f,8)

local lbl = Instance.new("TextLabel", f) lbl.Size, lbl.Position, lbl.Text, lbl.Font, lbl.TextSize, lbl.TextColor3, lbl.TextXAlignment, lbl.BackgroundTransparency = UDim2.new(1,-20,0,18), UDim2.new(0,10,0,4), tText..": "..def, Enum.Font.GothamSemibold, 11, Color3.fromRGB(230,230,230), Enum.TextXAlignment.Left, 1
    local sBtn = Instance.new("TextButton", f) sBtn.Size, sBtn.Position, sBtn.BackgroundColor3, sBtn.Text = UDim2.new(1,-20,0,8), UDim2.new(0,10,0,23), Color3.fromRGB(42,42,52), "" AddCorner(sBtn, 4)
    local fill = Instance.new("Frame", sBtn) fill.Size, fill.BackgroundColor3, fill.BorderSizePixel = UDim2.new((def-min)/(max-min),0,1,0), Color3.fromRGB(80,130,240), 0 AddCorner(fill, 4)
    local d = Instance.new("TextLabel", f) d.Size, d.Position, d.Text, d.Font, d.TextSize, d.TextColor3, d.TextXAlignment, d.BackgroundTransparency = UDim2.new(1,-20,0,12), UDim2.new(0,10,0,33), dText, Enum.Font.Gotham, 9, Color3.fromRGB(110,110,130), Enum.TextXAlignment.Left, 1

    local drag = false
    sBtn.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = true end end)
    UIS.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then drag = false end end)
    UIS.InputChanged:Connect(function(i)
        if drag and i.UserInputType == Enum.UserInputType.MouseMovement then
            local pos = math.clamp((i.Position.X - sBtn.AbsolutePosition.X) / sBtn.AbsoluteSize.X, 0, 1)
            local val = math.floor(min + (max - min) * pos)
            S[key] = val lbl.Text = tText..": "..val fill.Size = UDim2.new(pos, 0, 1, 0)
            if key == "FOV" then FOV.Radius = val end
        end
    end)
end

CreateKeybind("Скрыть UI", "Горячая клавиша скрытия меню", "UIToggleKey")
CreateToggle("Aimbot", "Авто-наведение на голову цели", "Aimbot")
CreateKeybind("Бинд Aimbot", "Переключатель аимбота", "AimbotKey")
CreateToggle("Target Look", "Удержание взгляда на противнике", "TargetLook")
CreateKeybind("Бинд Target Look", "Переключатель фокуса камеры", "TargetLookKey")
CreateToggle("Wallcheck", "Игнорировать цели за препятствиями", "WallCheck")
CreateToggle("20M Robux ESP", "Подсветка игроков сквозь стены", "ESP")
CreateToggle("BunnyHop (BHop)", "Авто-прыжки с разгоном скорости", "BHop")
CreateKeybind("Бинд BHop", "Переключатель функции бхопа", "BHopKey")
CreateSlider("Макс. скорость BHop", "Лимит разгона для защиты от античита", 16, 100, S.BHopMaxSpeed, "BHopMaxSpeed")
CreateSlider("Размер FOV", "Радиус захвата вокруг прицела", 30, 400, S.FOV, "FOV")
CreateSlider("Smoothness", "Плавность доводки прицела", 1, 10, S.Smoothness, "Smoothness")
CreateToggle("Auto Play", "Автоматический бег к врагам", "AutoPlay")

local function UpdToggle(key)
    if UIEl[key] then UIEl[key].Text.Text = S[key] and "ON" or "OFF" UIEl[key].Ind.BackgroundColor3 = S[key] and Color3.fromRGB(60,160,90) or Color3.fromRGB(45,45,55) end
end

UIS.InputBegan:Connect(function(i, g)
    if g then return end
    if i.KeyCode == S.UIToggleKey then Main.Visible, OpenBtn.Visible = not Main.Visible, false
    elseif i.KeyCode == S.AimbotKey then S.Aimbot = not S.Aimbot UpdToggle("Aimbot")
    elseif i.KeyCode == S.TargetLookKey then S.TargetLook = not S.TargetLook UpdToggle("TargetLook")
    elseif i.KeyCode == S.BHopKey then 
        S.BHop = not S.BHop 
        UpdToggle("BHop")
        if S.BHop then
            pcall(function()
                local h = LP.Character and LP.Character:FindFirstChildOfClass("Humanoid")
                if h then BHop.Base = h.WalkSpeed BHop.Cur = h.WalkSpeed end
            end)
        end
    end
end)

-- ЛОГИКА БХОПА С ДИНАМИЧЕСКИМ ЛИМИТОМ И БИНДОМ
RS.RenderStepped:Connect(function()
    if not S.BHop then return end
    local c = LP.Character
    local h = c and c:FindFirstChildOfClass("Humanoid")
    if not h or h.Health <= 0 then return end

    if h.FloorMaterial ~= Enum.Material.Air then
        if h.MoveDirection.Magnitude > 0 then
            h.Jump = true

if BHop.InAir then
                BHop.InAir = false
                BHop.LastJump = tick()
                if BHop.Cur < S.BHopMaxSpeed then
                    BHop.Cur = math.min(BHop.Cur + BHop.Gain, S.BHopMaxSpeed)
                end
            end
            h.WalkSpeed = BHop.Cur
        else
            BHop.Cur = BHop.Base
            h.WalkSpeed = BHop.Base
        end
    else
        BHop.InAir = true
        h.WalkSpeed = BHop.Cur
    end

    if h.FloorMaterial ~= Enum.Material.Air and tick() - BHop.LastJump > 1.0 then
        BHop.Cur = BHop.Base
        h.WalkSpeed = BHop.Base
    end
end)

local function ApplyESP(p)
    if p ~= LP and p.Character then
        local hl = p.Character:FindFirstChild("ESPHighlight")
        if not hl then
            hl = Instance.new("Highlight", p.Character) hl.Name, hl.FillColor, hl.OutlineColor, hl.FillTransparency, hl.DepthMode = "ESPHighlight", Color3.fromRGB(255,60,60), Color3.fromRGB(255,255,255), 0.5, Enum.HighlightDepthMode.AlwaysOnTop
        end
        hl.Enabled = S.ESP
    end
end

local function IsVisible(part)
    if not S.WallCheck then return true end
    local rp = RaycastParams.new() rp.FilterType = Enum.RaycastFilterType.Exclude
    if LP.Character then rp.FilterDescendantsInstances = {LP.Character} end
    local ray = WS:Raycast(Cam.CFrame.Position, part.Position - Cam.CFrame.Position, rp)
    return ray and ray.Instance and ray.Instance:IsDescendantOf(part.Parent) or false
end

local function GetTarget()
    local target, sDist, mPos = nil, S.FOV, Vector2.new(Cam.ViewportSize.X/2, Cam.ViewportSize.Y/2)
    for _, p in pairs(Players:GetPlayers()) do
        if p ~= LP and p.Character and p.Character:FindFirstChild("Head") then
            local head, hum = p.Character.Head, p.Character:FindFirstChildOfClass("Humanoid")
            if hum and hum.Health > 0 then
                local sPos, onScreen = Cam:WorldToViewportPoint(head.Position)
                if onScreen then
                    local dist = (Vector2.new(sPos.X, sPos.Y) - mPos).Magnitude
                    if dist < sDist and IsVisible(head) then sDist, target = dist, head end
                end
            end
        end
    end
    return target
end

RS.RenderStepped:Connect(function()
    FOV.Position, FOV.Visible = Vector2.new(Cam.ViewportSize.X/2, Cam.ViewportSize.Y/2), S.Aimbot or S.TargetLook
    for _, p in pairs(Players:GetPlayers()) do if p.Character then ApplyESP(p) end end
    if S.Aimbot or S.TargetLook then
        local tHead = GetTarget()
        if tHead then Cam.CFrame = Cam.CFrame:Lerp(CFrame.new(Cam.CFrame.Position, tHead.Position), math.clamp(11 - S.Smoothness, 1, 10) / 10) end
    end
end)

task.spawn(function()
    while task.wait(0.3) do
        if S.AutoPlay then
            pcall(function()
                local mc = LP.Character if not mc or not mc:FindFirstChild("HumanoidRootPart") then return end
                local closeE, sDist = nil, math.huge
                for _, p in pairs(Players:GetPlayers()) do
                    if p ~= LP and p.Character and p.Character:FindFirstChild("Humanoid") and p.Character.Humanoid.Health > 0 then
                        local dist = (mc.HumanoidRootPart.Position - p.Character.HumanoidRootPart.Position).Magnitude
                        if dist < sDist then sDist, closeE = dist, p.Character end
                    end
                end
                if closeE and closeE:FindFirstChild("HumanoidRootPart") then mc.Humanoid:MoveTo(closeE.HumanoidRootPart.Position) end
            end)
        end
    end
end)