ScrollHub
Key RequiredUniversal

ScrollHub

Universal Scriptscroll11readerscroll11reader 1.3K views 750 executesUpdated May 14, 2026
Unrated
00
Lua Script•1177 lines (60808 chars)
-- ============================================================
--   ScrollMenu  v7  |  RMB Aimbot  |  Fly Others  |  Fixed
-- ============================================================
local Players     = game:GetService("Players")
local UIS         = game:GetService("UserInputService")
local RunService  = game:GetService("RunService")
local TweenSvc    = game:GetService("TweenService")
local Lighting    = game:GetService("Lighting")
local VirtualUser = game:GetService("VirtualUser")
local Items       = game:GetService("MarketplaceService")
local Marketplace = game:GetService("MarketplaceService")

local lp    = Players.LocalPlayer
local mouse = lp:GetMouse()
local cam   = workspace.CurrentCamera

-- ─── Colors ────────────────────────────────────────────────
local CB  = Color3.fromRGB(28 ,28 ,28 )
local CS  = Color3.fromRGB(20 ,20 ,20 )
local CT  = Color3.fromRGB(15 ,15 ,15 )
local CI  = Color3.fromRGB(40 ,40 ,40 )
local CD  = Color3.fromRGB(50 ,50 ,50 )
local CA  = Color3.fromRGB(65 ,115,255)
local CG  = Color3.fromRGB(48 ,209,88 )
local CR  = Color3.fromRGB(220,50 ,50 )
local CW  = Color3.fromRGB(235,235,235)
local CQ  = Color3.fromRGB(110,110,110)
local CSL = Color3.fromRGB(32 ,32 ,58 )

-- ─── Sizes ─────────────────────────────────────────────────
local WW,WH = 580,440
local SW     = 145
local TH     = 38
local RH     = 46
local SHH    = 58
local GH     = 22
local IP     = 6
local PP     = 10

-- ─── State vars (all at top scope) ─────────────────────────
local flySpd   = 65;  local walkSpd  = 16;  local jumpPwr = 50
local aimFov   = 150; local aimSmooth= 0.85; local aimPred = 0.08; local aimMaxD = 500
local aimbotOn = false; local silentOn = false; local lockOnOn = false
local skipTeamAim=false; local visOnly=false; local aimbotBone="Head"
local lockTgt  = nil;  local myRoot  = nil
local espClr   = Color3.fromRGB(255,50,50)
local espOn    = false; local espRMBOnly=true
local espName  = true;  local espInfo=true; local espHP=true; local espTeam=false
local espDrws  = {}

local flyOn=false; local ncOn=false; local godOn=false; local infJump=false
local invisOn=false; local spinOn=false; local bhopOn=false; local afkOn=false
local flyOthersAll=false; local flyOthersSet={}
local frozenMap={}; local spamKMap={}; local spamKConns={}
local clickTPOn=false; local fbOn=false; local fogOn=false; local hitboxOn=false
local flyConn,flyBV,flyBG,ncConn,godConn,godHConn,spinConn,bhopConn,afkConn

local selPlayer = nil

-- ============================================================
-- FEATURE FUNCTIONS  (defined first so callbacks can use them)
-- ============================================================
-- ── Network ownership helper ────────────────────────────────
-- Claiming ownership lets our client's property changes replicate
local function claimOwner(part)
    pcall(function() part:SetNetworkOwner(lp) end)
    -- some executors expose this as a global
    pcall(function() if setnetworkowner then setnetworkowner(part, lp) end end)
end

local function killChar(ch)
    if not ch then return end
    local root = ch:FindFirstChild("HumanoidRootPart")
    local hum  = ch:FindFirstChildOfClass("Humanoid")

    -- Claim ownership so our edits replicate in FE games
    if root then
        claimOwner(root)
        for _, p in pairs(ch:GetDescendants()) do
            if p:IsA("BasePart") then pcall(function() claimOwner(p) end) end
        end
    end

    -- Method 1: standard health = 0
    pcall(function()
        if hum then hum.Health = 0; hum:TakeDamage(math.huge) end
    end)

    -- Method 2: sethiddenproperty (available in many executors — bypasses FE)
    pcall(function()
        if hum and sethiddenproperty then
            sethiddenproperty(hum, "Health", 0)
        end
    end)

    -- Method 3: BreakJoints
    pcall(function() ch:BreakJoints() end)

    -- Method 4: void teleport — triggers game's own kill plane server-side
    pcall(function()
        if root then root.CFrame = CFrame.new(root.Position.X, -9999, root.Position.Z) end
    end)

    -- Method 5: extreme downward velocity to punch through kill plane fast
    pcall(function()
        if root then root.AssemblyLinearVelocity = Vector3.new(0, -9999, 0) end
    end)
end

local function flingChar(ch)
    if not ch then return end
    local r=ch:FindFirstChild("HumanoidRootPart"); if not r then return end
    local fv=Instance.new("BodyVelocity")
    fv.Velocity=Vector3.new(math.random(-1,1)*900,700,math.random(-1,1)*900)
    fv.MaxForce=Vector3.new(1e9,1e9,1e9); fv.Parent=r
    game:GetService("Debris"):AddItem(fv,0.15)
end

local function startFly()
    local ch=lp.Character; if not ch then return end
    local r=ch:FindFirstChild("HumanoidRootPart"); local h=ch:FindFirstChildOfClass("Humanoid")
    if not r or not h then return end; h.PlatformStand=true
    flyBV=Instance.new("BodyVelocity"); flyBV.Velocity=Vector3.zero; flyBV.MaxForce=Vector3.new(1e9,1e9,1e9); flyBV.Parent=r
    flyBG=Instance.new("BodyGyro"); flyBG.MaxTorque=Vector3.new(1e9,1e9,1e9); flyBG.P=1e4; flyBG.CFrame=r.CFrame; flyBG.Parent=r
    flyConn=RunService.RenderStepped:Connect(function()
        local rr=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart"); if not rr then return end
        local cf=cam.CFrame; local d=Vector3.zero
        if UIS:IsKeyDown(Enum.KeyCode.W) then d=d+cf.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.S) then d=d-cf.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.A) then d=d-cf.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.D) then d=d+cf.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.Space) then d=d+Vector3.new(0,1,0) end
        if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then d=d-Vector3.new(0,1,0) end
        flyBV.Velocity=d.Magnitude>0 and d.Unit*flySpd or Vector3.zero; flyBG.CFrame=cf
    end)
end

local function stopFly()
    if flyConn then flyConn:Disconnect(); flyConn=nil end
    if flyBV then flyBV:Destroy(); flyBV=nil end
    if flyBG then flyBG:Destroy(); flyBG=nil end
    local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid"); if h then h.PlatformStand=false end
end

local function startGod()
    local function applyG(ch)
        local h=ch and ch:FindFirstChildOfClass("Humanoid"); if not h then return end
        pcall(function() h:SetStateEnabled(Enum.HumanoidStateType.Dead,false) end)
        if godHConn then godHConn:Disconnect() end
        godHConn=h.HealthChanged:Connect(function() if godOn then h.Health=h.MaxHealth end end)
        h.Health=h.MaxHealth
    end
    applyG(lp.Character)
    lp.CharacterAdded:Connect(function(c) if godOn then task.wait(0.1); applyG(c) end end)
    godConn=RunService.Heartbeat:Connect(function()
        local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid")
        if h then if h.Health<h.MaxHealth then h.Health=h.MaxHealth end
            pcall(function() h:SetStateEnabled(Enum.HumanoidStateType.Dead,false) end) end
    end)
end

local function stopGod()
    if godConn then godConn:Disconnect(); godConn=nil end
    if godHConn then godHConn:Disconnect(); godHConn=nil end
    local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid")
    if h then pcall(function() h:SetStateEnabled(Enum.HumanoidStateType.Dead,true) end) end
end

local function applyInvis(s)
    local ch=lp.Character; if not ch then return end
    for _,p in pairs(ch:GetDescendants()) do
        if p:IsA("BasePart") and p.Name~="HumanoidRootPart" then p.Transparency=s and 1 or 0 end
        if p:IsA("Decal") then p.Transparency=s and 1 or 0 end
    end
end

-- fly a specific other player (toggleable)
local function toggleFlyOther(p)
    if not p then return end
    if flyOthersSet[p] then
        flyOthersSet[p]=nil
        pcall(function()
            local r=p.Character and p.Character:FindFirstChild("HumanoidRootPart"); if not r then return end
            local bv=r:FindFirstChild("_OFBV"); if bv then bv:Destroy() end
            local h=p.Character:FindFirstChildOfClass("Humanoid"); if h then h.PlatformStand=false end
        end)
        return false
    else
        flyOthersSet[p]=true
        return true
    end
end

-- persist fly on others every heartbeat
-- Combines ownership claim + raw velocity + BodyVelocity for maximum FE compatibility
RunService.Heartbeat:Connect(function()

    -- ── per-target fly ──────────────────────────────────────
    for p, _ in pairs(flyOthersSet) do
        pcall(function()
            local ch  = p.Character; if not ch then return end
            local r   = ch:FindFirstChild("HumanoidRootPart"); if not r then return end
            local hum = ch:FindFirstChildOfClass("Humanoid")

            -- Claim network ownership so our velocity changes replicate
            claimOwner(r)

            -- Disable humanoid states that fight upward movement
            if hum then
                hum.PlatformStand = true
                pcall(function() hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) end)
                pcall(function() hum:SetStateEnabled(Enum.HumanoidStateType.Landed,      false) end)
            end

            -- Raw velocity (set every frame — fights server corrections)
            local cur = r.AssemblyLinearVelocity
            r.AssemblyLinearVelocity = Vector3.new(cur.X, 50, cur.Z)

            -- BodyVelocity fallback
            local bv = r:FindFirstChild("_OFBV")
            if not bv then
                bv = Instance.new("BodyVelocity"); bv.Name = "_OFBV"
                bv.MaxForce = Vector3.new(0, 1e9, 0); bv.Parent = r
            end
            bv.Velocity = Vector3.new(0, 50, 0)
        end)
    end

    -- ── fly all toggle ──────────────────────────────────────
    if flyOthersAll then
        for _, p in ipairs(Players:GetPlayers()) do
            if p ~= lp then
                pcall(function()
                    local ch  = p.Character; if not ch then return end
                    local r   = ch:FindFirstChild("HumanoidRootPart"); if not r then return end
                    local hum = ch:FindFirstChildOfClass("Humanoid")

                    claimOwner(r)

                    if hum then
                        hum.PlatformStand = true
                        pcall(function() hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) end)
                        pcall(function() hum:SetStateEnabled(Enum.HumanoidStateType.Landed,      false) end)
                    end

                    local cur = r.AssemblyLinearVelocity
                    r.AssemblyLinearVelocity = Vector3.new(cur.X, 50, cur.Z)

                    local bv = r:FindFirstChild("_OFBV")
                    if not bv then
                        bv = Instance.new("BodyVelocity"); bv.Name = "_OFBV"
                        bv.MaxForce = Vector3.new(0, 1e9, 0); bv.Parent = r
                    end
                    bv.Velocity = Vector3.new(0, 50, 0)
                end)
            end
        end
    end

    -- ── freeze persistence ──────────────────────────────────
    for p, frz in pairs(frozenMap) do
        if frz then pcall(function()
            local r = p.Character and p.Character:FindFirstChild("HumanoidRootPart")
            if r then
                claimOwner(r)
                if not r.Anchored then r.Anchored = true end
            end
        end) end
    end
end)

lp.CharacterAdded:Connect(function(ch)
    if flyOn then task.wait(0.5); startFly() end
    if invisOn then task.wait(0.5); applyInvis(true) end
    local h=ch:WaitForChild("Humanoid",5)
    if h then h.WalkSpeed=walkSpd; h.JumpPower=jumpPwr end
end)

UIS.JumpRequest:Connect(function()
    if not infJump then return end
    local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid")
    if h then h:ChangeState(Enum.HumanoidStateType.Jumping) end
end)

mouse.Button1Down:Connect(function()
    if not clickTPOn then return end
    local r=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart")
    if mouse.Hit and r then r.CFrame=mouse.Hit+Vector3.new(0,3,0) end
end)

-- ============================================================
-- GUI
-- ============================================================
local SG=Instance.new("ScreenGui"); SG.Name="ScrollMenuV7"
SG.ResetOnSpawn=false; SG.ZIndexBehavior=Enum.ZIndexBehavior.Sibling; SG.Parent=game:GetService("CoreGui")

local Main=Instance.new("Frame"); Main.Size=UDim2.new(0,WW,0,WH)
Main.Position=UDim2.new(.5,-WW/2,.5,-WH/2); Main.BackgroundColor3=CB
Main.BorderSizePixel=0; Main.Parent=SG
Instance.new("UICorner",Main).CornerRadius=UDim.new(0,8)
local mstroke=Instance.new("UIStroke",Main); mstroke.Color=CD; mstroke.Thickness=1; mstroke.Transparency=0.5

-- title bar
local TB=Instance.new("Frame"); TB.Size=UDim2.new(1,0,0,TH); TB.BackgroundColor3=CT
TB.BorderSizePixel=0; TB.Parent=Main; Instance.new("UICorner",TB).CornerRadius=UDim.new(0,8)

local TLbl=Instance.new("TextLabel"); TLbl.Text="ScrollMenu  |  v7"
TLbl.Font=Enum.Font.GothamBold; TLbl.TextSize=14; TLbl.TextColor3=CW
TLbl.BackgroundTransparency=1; TLbl.Size=UDim2.new(1,-90,1,0); TLbl.Position=UDim2.new(0,14,0,0)
TLbl.TextXAlignment=Enum.TextXAlignment.Left; TLbl.Parent=TB

local function mkTB2(txt,xOff,bg,fg)
    local b=Instance.new("TextButton"); b.Text=txt; b.Font=Enum.Font.GothamBold; b.TextSize=13
    b.TextColor3=fg; b.BackgroundColor3=bg; b.Size=UDim2.new(0,26,0,26)
    b.Position=UDim2.new(1,xOff,0,6); b.BorderSizePixel=0; b.AutoButtonColor=false; b.Parent=TB
    Instance.new("UICorner",b).CornerRadius=UDim.new(0,5); return b
end
local CloseBtn=mkTB2("✕",-32,Color3.fromRGB(140,20,20),Color3.fromRGB(255,150,150))
local MinBtn  =mkTB2("─",-62,Color3.fromRGB(35,35,60), Color3.fromRGB(160,160,255))

-- drag
local drag,dSt,dPos
TB.InputBegan:Connect(function(i) if i.UserInputType==Enum.UserInputType.MouseButton1 then drag,dSt,dPos=true,i.Position,Main.Position end end)
TB.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 d=i.Position-dSt; Main.Position=UDim2.new(dPos.X.Scale,dPos.X.Offset+d.X,dPos.Y.Scale,dPos.Y.Offset+d.Y)
    end
end)

-- sidebar
local Side=Instance.new("Frame"); Side.Size=UDim2.new(0,SW,0,WH-TH)
Side.Position=UDim2.new(0,0,0,TH); Side.BackgroundColor3=CS; Side.BorderSizePixel=0; Side.Parent=Main
local sdiv=Instance.new("Frame"); sdiv.Size=UDim2.new(0,1,0,WH-TH); sdiv.Position=UDim2.new(0,SW,0,TH)
sdiv.BackgroundColor3=CD; sdiv.BorderSizePixel=0; sdiv.Parent=Main

local PTagLbl=Instance.new("TextLabel"); PTagLbl.Text="  👤  "..lp.Name
PTagLbl.Font=Enum.Font.Gotham; PTagLbl.TextSize=11; PTagLbl.TextColor3=CQ
PTagLbl.BackgroundTransparency=1; PTagLbl.Size=UDim2.new(1,0,0,32); PTagLbl.Position=UDim2.new(0,0,1,-32)
PTagLbl.TextXAlignment=Enum.TextXAlignment.Left; PTagLbl.Parent=Side

-- content
local ConF=Instance.new("Frame"); ConF.Size=UDim2.new(0,WW-SW-1,0,WH-TH)
ConF.Position=UDim2.new(0,SW+1,0,TH); ConF.BackgroundColor3=CB; ConF.BorderSizePixel=0; ConF.Parent=Main

local ConScroll=Instance.new("ScrollingFrame"); ConScroll.Size=UDim2.new(1,0,1,0)
ConScroll.BackgroundTransparency=1; ConScroll.BorderSizePixel=0; ConScroll.ScrollBarThickness=4
ConScroll.ScrollBarImageColor3=Color3.fromRGB(55,55,80); ConScroll.CanvasSize=UDim2.new(0,0,0,400)
ConScroll.Parent=ConF

-- ============================================================
-- TAB SYSTEM
-- ============================================================
local pages   = {}   -- id → {frame, h}
local tabBtns2 = {}  -- id → button
local tabY2   = 8
local activeTab = nil

local function switchTab(id)
    for tid,pg in pairs(pages) do pg.frame.Visible=(tid==id) end
    if pages[id] then ConScroll.CanvasSize=UDim2.new(0,0,0,pages[id].h); ConScroll.CanvasPosition=Vector2.new(0,0) end
    for tid,btn in pairs(tabBtns2) do
        btn.BackgroundColor3=tid==id and CSL or CS
        btn.TextColor3=tid==id and CW or CQ
    end
    activeTab=id
end

local function mkTabBtn(id,icon,name)
    local btn=Instance.new("TextButton"); btn.Text="  "..icon.."  "..name
    btn.Font=Enum.Font.Gotham; btn.TextSize=13; btn.TextColor3=CQ
    btn.BackgroundColor3=CS; btn.Size=UDim2.new(1,0,0,42)
    btn.Position=UDim2.new(0,0,0,tabY2); btn.TextXAlignment=Enum.TextXAlignment.Left
    btn.BorderSizePixel=0; btn.AutoButtonColor=false; btn.Parent=Side
    Instance.new("UICorner",btn).CornerRadius=UDim.new(0,5)
    tabBtns2[id]=btn; tabY2=tabY2+44
    local pg=Instance.new("Frame"); pg.Size=UDim2.new(1,0,0,400)
    pg.BackgroundTransparency=1; pg.Visible=false; pg.Parent=ConScroll
    pages[id]={frame=pg,h=400}
    btn.MouseButton1Click:Connect(function() switchTab(id) end)
    return pg
end

-- ============================================================
-- ITEM HELPERS
-- ============================================================
local function mkSec2(par,y,txt)
    local l=Instance.new("TextLabel"); l.Text=txt:upper()
    l.Font=Enum.Font.GothamBold; l.TextSize=10; l.TextColor3=CQ; l.BackgroundTransparency=1
    l.Size=UDim2.new(1,-PP*2,0,GH); l.Position=UDim2.new(0,PP,0,y[1])
    l.TextXAlignment=Enum.TextXAlignment.Left; l.Parent=par
    y[1]=y[1]+GH+4
end

local function baseRow(par,y)
    local r=Instance.new("Frame"); r.Size=UDim2.new(1,-PP*2,0,RH)
    r.Position=UDim2.new(0,PP,0,y[1]); r.BackgroundColor3=CI; r.BorderSizePixel=0; r.Parent=par
    Instance.new("UICorner",r).CornerRadius=UDim.new(0,7)
    y[1]=y[1]+RH+IP; return r
end

-- toggle row — returns setter fn
local function mkTog2(par,y,lTxt,sTxt,init,cb)
    local r=baseRow(par,y)
    local lbl=Instance.new("TextLabel"); lbl.Text=lTxt; lbl.Font=Enum.Font.GothamBold; lbl.TextSize=13
    lbl.TextColor3=CW; lbl.BackgroundTransparency=1
    lbl.Size=UDim2.new(0.6,0,sTxt and 0.55 or 1,0); lbl.Position=UDim2.new(0,12,0,0)
    lbl.TextXAlignment=Enum.TextXAlignment.Left; lbl.Parent=r
    if sTxt then
        local s=Instance.new("TextLabel"); s.Text=sTxt; s.Font=Enum.Font.Gotham; s.TextSize=10
        s.TextColor3=CQ; s.BackgroundTransparency=1; s.Size=UDim2.new(0.6,0,0.45,0)
        s.Position=UDim2.new(0,12,0.55,0); s.TextXAlignment=Enum.TextXAlignment.Left; s.Parent=r
    end
    local TW2,TH2=46,26; local KS=TH2-4
    local track=Instance.new("Frame"); track.Size=UDim2.new(0,TW2,0,TH2)
    track.Position=UDim2.new(1,-(TW2+10),0.5,-TH2/2); track.BorderSizePixel=0; track.Parent=r
    track.BackgroundColor3=init and CG or Color3.fromRGB(58,58,58)
    Instance.new("UICorner",track).CornerRadius=UDim.new(1,0)
    local kn=Instance.new("Frame"); kn.Size=UDim2.new(0,KS,0,KS); kn.BackgroundColor3=CW
    kn.BorderSizePixel=0; kn.Parent=track
    kn.Position=init and UDim2.new(1,-(KS+2),0.5,-KS/2) or UDim2.new(0,2,0.5,-KS/2)
    Instance.new("UICorner",kn).CornerRadius=UDim.new(1,0)
    local hit=Instance.new("TextButton"); hit.Size=UDim2.new(1,0,1,0)
    hit.BackgroundTransparency=1; hit.Text=""; hit.Parent=r
    local st=init
    hit.MouseButton1Click:Connect(function()
        st=not st
        TweenSvc:Create(track,TweenInfo.new(0.15),{BackgroundColor3=st and CG or Color3.fromRGB(58,58,58)}):Play()
        TweenSvc:Create(kn,TweenInfo.new(0.15),{Position=st and UDim2.new(1,-(KS+2),0.5,-KS/2) or UDim2.new(0,2,0.5,-KS/2)}):Play()
        cb(st)
    end)
    return function(ns)
        st=ns; track.BackgroundColor3=ns and CG or Color3.fromRGB(58,58,58)
        kn.Position=ns and UDim2.new(1,-(KS+2),0.5,-KS/2) or UDim2.new(0,2,0.5,-KS/2)
    end
end

-- action row — button on right, returns button
local function mkAct2(par,y,lTxt,sTxt,btnTxt,btnCol,cb)
    btnCol=btnCol or CA; local r=baseRow(par,y)
    local lbl=Instance.new("TextLabel"); lbl.Text=lTxt; lbl.Font=Enum.Font.GothamBold; lbl.TextSize=13
    lbl.TextColor3=CW; lbl.BackgroundTransparency=1
    lbl.Size=UDim2.new(0.55,0,sTxt and 0.55 or 1,0); lbl.Position=UDim2.new(0,12,0,0)
    lbl.TextXAlignment=Enum.TextXAlignment.Left; lbl.Parent=r
    if sTxt then
        local s=Instance.new("TextLabel"); s.Text=sTxt; s.Font=Enum.Font.Gotham; s.TextSize=10
        s.TextColor3=CQ; s.BackgroundTransparency=1; s.Size=UDim2.new(0.55,0,0.45,0)
        s.Position=UDim2.new(0,12,0.55,0); s.TextXAlignment=Enum.TextXAlignment.Left; s.Parent=r
    end
    local BW,BH=78,28
    local btn=Instance.new("TextButton"); btn.Text=btnTxt; btn.Font=Enum.Font.GothamBold; btn.TextSize=11
    btn.TextColor3=CW; btn.BackgroundColor3=btnCol; btn.Size=UDim2.new(0,BW,0,BH)
    btn.Position=UDim2.new(1,-(BW+10),0.5,-BH/2); btn.BorderSizePixel=0; btn.AutoButtonColor=false; btn.Parent=r
    Instance.new("UICorner",btn).CornerRadius=UDim.new(0,6)
    btn.MouseEnter:Connect(function() TweenSvc:Create(btn,TweenInfo.new(0.1),{BackgroundColor3=btnCol:lerp(CW,0.18)}):Play() end)
    btn.MouseLeave:Connect(function() TweenSvc:Create(btn,TweenInfo.new(0.1),{BackgroundColor3=btnCol}):Play() end)
    btn.MouseButton1Click:Connect(cb); return btn
end

-- slider row — returns setter fn
local function mkSld2(par,y,lTxt,mn,mx,def,dec,unit,cb)
    unit=unit or""; dec=dec or 0
    local r=Instance.new("Frame"); r.Size=UDim2.new(1,-PP*2,0,SHH)
    r.Position=UDim2.new(0,PP,0,y[1]); r.BackgroundColor3=CI; r.BorderSizePixel=0; r.Parent=par
    Instance.new("UICorner",r).CornerRadius=UDim.new(0,7)
    local lbl=Instance.new("TextLabel"); lbl.Text=lTxt; lbl.Font=Enum.Font.GothamBold; lbl.TextSize=12
    lbl.TextColor3=CW; lbl.BackgroundTransparency=1; lbl.Size=UDim2.new(0.62,0,0,22)
    lbl.Position=UDim2.new(0,12,0,9); lbl.TextXAlignment=Enum.TextXAlignment.Left; lbl.Parent=r
    local vLbl=Instance.new("TextLabel"); vLbl.Font=Enum.Font.GothamBold; vLbl.TextSize=12
    vLbl.TextColor3=CA; vLbl.BackgroundTransparency=1; vLbl.Size=UDim2.new(0.34,0,0,22)
    vLbl.Position=UDim2.new(0.66,-12,0,9); vLbl.TextXAlignment=Enum.TextXAlignment.Right; vLbl.Parent=r
    local tr=Instance.new("Frame"); tr.Size=UDim2.new(1,-24,0,5)
    tr.Position=UDim2.new(0,12,0,38); tr.BackgroundColor3=Color3.fromRGB(52,52,52); tr.BorderSizePixel=0; tr.Parent=r
    Instance.new("UICorner",tr).CornerRadius=UDim.new(0,3)
    local r0=math.clamp((def-mn)/(mx-mn),0,1)
    local fill=Instance.new("Frame"); fill.Size=UDim2.new(r0,0,1,0); fill.BackgroundColor3=CA; fill.BorderSizePixel=0; fill.Parent=tr
    Instance.new("UICorner",fill).CornerRadius=UDim.new(0,3)
    local KS2=13; local kn2=Instance.new("Frame"); kn2.Size=UDim2.new(0,KS2,0,KS2)
    kn2.Position=UDim2.new(r0,-KS2/2,0.5,-KS2/2); kn2.BackgroundColor3=CW; kn2.BorderSizePixel=0; kn2.Parent=tr
    Instance.new("UICorner",kn2).CornerRadius=UDim.new(1,0)
    local function fmt(v) return dec>0 and string.format("%."..dec.."f",v)..unit or tostring(math.floor(v+0.5))..unit end
    vLbl.Text=fmt(def)
    local function upd(sx)
        local ab=tr.AbsolutePosition; local sz=tr.AbsoluteSize
        local rx=math.clamp(sx-ab.X,0,sz.X); local ratio=rx/sz.X
        local raw=mn+ratio*(mx-mn); local val=dec>0 and math.floor(raw*(10^dec)+0.5)/(10^dec) or math.floor(raw+0.5)
        fill.Size=UDim2.new(ratio,0,1,0); kn2.Position=UDim2.new(ratio,-KS2/2,0.5,-KS2/2); vLbl.Text=fmt(val); cb(val)
    end
    local act2=false
    tr.InputBegan:Connect(function(i) if i.UserInputType==Enum.UserInputType.MouseButton1 then act2=true; upd(i.Position.X) end end)
    UIS.InputChanged:Connect(function(i) if act2 and i.UserInputType==Enum.UserInputType.MouseMovement then upd(i.Position.X) end end)
    UIS.InputEnded:Connect(function(i) if i.UserInputType==Enum.UserInputType.MouseButton1 then act2=false end end)
    y[1]=y[1]+SHH+IP
    return function(v) local ratio=math.clamp((v-mn)/(mx-mn),0,1); fill.Size=UDim2.new(ratio,0,1,0); kn2.Position=UDim2.new(ratio,-KS2/2,0.5,-KS2/2); vLbl.Text=fmt(v) end
end

local function finPage(id,y) local h=y[1]+8; pages[id].h=h; pages[id].frame.Size=UDim2.new(1,0,0,h) end

-- ============================================================
-- BUILD PAGES
-- ============================================================

-- ── AIMBOT ──────────────────────────────────────────────────
local pgAimbot=mkTabBtn("aimbot","🎯","Aimbot")
local setAimTog,setSilentTog,setLockTog,setSkipTog,setVisTog
local aimTargetLbl
do
    local y={8}
    mkSec2(pgAimbot,y,"aimbot")
    setAimTog   =mkTog2(pgAimbot,y,"Aimbot","Hold RMB to activate  [Z]",false,function(s) aimbotOn=s end)
    setSilentTog=mkTog2(pgAimbot,y,"Silent Aim","Instant snap — no visible lerp",false,function(s) silentOn=s end)
    setLockTog  =mkTog2(pgAimbot,y,"Lock-On","Stick to one target until they die",false,function(s) lockOnOn=s; lockTgt=nil end)
    setSkipTog  =mkTog2(pgAimbot,y,"Skip Teammates","Ignore your own team",false,function(s) skipTeamAim=s end)
    setVisTog   =mkTog2(pgAimbot,y,"Visible Only","Only target players you can see",false,function(s) visOnly=s end)
    mkSec2(pgAimbot,y,"bone")
    local boneIsHead=true
    mkAct2(pgAimbot,y,"Aim Bone","Click to switch head ↔ body","HEAD",Color3.fromRGB(50,50,90),function(btn)
        boneIsHead=not boneIsHead; aimbotBone=boneIsHead and "Head" or "HumanoidRootPart"; btn.Text=boneIsHead and "HEAD" or "BODY"
    end)
    mkSec2(pgAimbot,y,"sliders")
    mkSld2(pgAimbot,y,"FOV Radius",  50,400,aimFov,   0," px",function(v) aimFov=v; fovCircle.Radius=v end)
    mkSld2(pgAimbot,y,"Smoothness",   1, 20, 17,       0,"",   function(v) aimSmooth=v/20 end)
    mkSld2(pgAimbot,y,"Prediction",   0,250, aimPred*1000,0," ms",function(v) aimPred=v/1000 end)
    mkSld2(pgAimbot,y,"Max Distance", 50,2000,aimMaxD, 0," st",function(v) aimMaxD=v end)
    mkSec2(pgAimbot,y,"target")
    aimTargetLbl=Instance.new("TextLabel"); aimTargetLbl.Text="Hold RMB to aim"
    aimTargetLbl.Font=Enum.Font.Gotham; aimTargetLbl.TextSize=12; aimTargetLbl.TextColor3=CQ
    aimTargetLbl.BackgroundTransparency=1; aimTargetLbl.Size=UDim2.new(1,-PP*2,0,28)
    aimTargetLbl.Position=UDim2.new(0,PP,0,y[1]); aimTargetLbl.TextXAlignment=Enum.TextXAlignment.Left; aimTargetLbl.Parent=pgAimbot
    y[1]=y[1]+34
    finPage("aimbot",y)
end

-- ── ESP ─────────────────────────────────────────────────────
local pgESP=mkTabBtn("esp","👁","ESP")
local setESPTog
do
    local y={8}
    mkSec2(pgESP,y,"esp")
    setESPTog    =mkTog2(pgESP,y,"ESP Enabled","2D box overlay — always through walls",false,function(s) espOn=s; if not s then for p,_ in pairs(espDrws) do for _,d in pairs(espDrws[p]) do pcall(function() d.Visible=false end) end end end end)
    mkTog2(pgESP,y,"Hold RMB to View","Release mouse to hide",true,function(s) espRMBOnly=s end)
    mkTog2(pgESP,y,"Enemies Only","Hide your teammates",false,function(s) espTeam=s end)
    mkSec2(pgESP,y,"display")
    mkTog2(pgESP,y,"Show Name",nil,true,function(s) espName=s end)
    mkTog2(pgESP,y,"Health + Distance",nil,true,function(s) espInfo=s end)
    mkTog2(pgESP,y,"Health Bar",nil,true,function(s) espHP=s end)
    mkSec2(pgESP,y,"color")
    mkAct2(pgESP,y,"Box Color","Click to set","Red",  CR,function() espClr=Color3.fromRGB(255,50,50) end)
    mkAct2(pgESP,y,"","","Green",CG,function() espClr=Color3.fromRGB(50,230,80) end)
    mkAct2(pgESP,y,"","","Blue", CA,function() espClr=Color3.fromRGB(60,130,255) end)
    mkAct2(pgESP,y,"","","White",Color3.fromRGB(200,200,200),function() espClr=Color3.fromRGB(240,240,240) end)
    finPage("esp",y)
end

-- ── TOOLS ───────────────────────────────────────────────────
local pgTools=mkTabBtn("tools","🛠","Tools")
local flyTargetBtn
do
    local y={8}
    mkSec2(pgTools,y,"target player")
    local PList=Instance.new("ScrollingFrame"); PList.Size=UDim2.new(1,-PP*2,0,100)
    PList.Position=UDim2.new(0,PP,0,y[1]); PList.BackgroundColor3=Color3.fromRGB(22,22,22)
    PList.BorderSizePixel=0; PList.ScrollBarThickness=3; PList.ScrollBarImageColor3=Color3.fromRGB(55,55,80)
    PList.CanvasSize=UDim2.new(0,0,0,0); PList.Parent=pgTools
    Instance.new("UICorner",PList).CornerRadius=UDim.new(0,7)
    Instance.new("UIListLayout",PList).Padding=UDim.new(0,2)
    y[1]=y[1]+106

    local pBtns={}
    local function refreshList()
        for _,b in pairs(pBtns) do b:Destroy() end; pBtns={}
        local all=Players:GetPlayers(); PList.CanvasSize=UDim2.new(0,0,0,#all*26)
        for _,p in ipairs(all) do
            if p~=lp then
                local tc=p.Team and p.Team.TeamColor.Color or Color3.fromRGB(140,140,195)
                local b=Instance.new("TextButton"); b.Text="  "..p.Name
                b.Font=Enum.Font.Gotham; b.TextSize=12; b.TextColor3=tc
                b.BackgroundColor3=Color3.fromRGB(28,28,28); b.Size=UDim2.new(1,0,0,24)
                b.TextXAlignment=Enum.TextXAlignment.Left; b.BorderSizePixel=0; b.Parent=PList
                Instance.new("UICorner",b).CornerRadius=UDim.new(0,4)
                b.MouseButton1Click:Connect(function()
                    selPlayer=p
                    for _,bb in pairs(pBtns) do bb.BackgroundColor3=Color3.fromRGB(28,28,28) end
                    b.BackgroundColor3=Color3.fromRGB(40,40,120)
                    -- update fly target button text
                    if flyTargetBtn then
                        flyTargetBtn.Text=flyOthersSet[p] and "Stop Fly" or "Fly"
                    end
                end)
                table.insert(pBtns,b)
            end
        end
    end
    refreshList(); Players.PlayerAdded:Connect(refreshList)
    Players.PlayerRemoving:Connect(function() task.wait(0.1); refreshList() end)
    mkAct2(pgTools,y,"","","↺ Refresh",Color3.fromRGB(35,35,60),refreshList)

    mkSec2(pgTools,y,"actions")
    local freezeBtn; freezeBtn=mkAct2(pgTools,y,"Freeze","Hold anchor on target","Freeze",Color3.fromRGB(18,90,168),function()
        if not selPlayer then return end; frozenMap[selPlayer]=not frozenMap[selPlayer]
        local r=selPlayer.Character and selPlayer.Character:FindFirstChild("HumanoidRootPart"); if r then r.Anchored=frozenMap[selPlayer] end
        freezeBtn.Text=frozenMap[selPlayer] and "Unfreeze" or "Freeze"
    end)
    mkAct2(pgTools,y,"Kill","BreakJoints + Health=0","Kill",CR,function() killChar(selPlayer and selPlayer.Character) end)

    local spamBtn; spamBtn=mkAct2(pgTools,y,"Spam Kill","Kills every heartbeat","Start",CR,function()
        if not selPlayer then return end
        if spamKMap[selPlayer] then
            spamKMap[selPlayer]=false; if spamKConns[selPlayer] then spamKConns[selPlayer]:Disconnect(); spamKConns[selPlayer]=nil end; spamBtn.Text="Start"
        else
            spamKMap[selPlayer]=true; local p=selPlayer
            spamKConns[p]=RunService.Heartbeat:Connect(function() if spamKMap[p] then killChar(p.Character) end end); spamBtn.Text="Stop"
        end
    end)
    mkAct2(pgTools,y,"TP → Them","Teleport to target","TP",Color3.fromRGB(80,30,150),function()
        local tc=selPlayer and selPlayer.Character; if not tc then return end
        local tr=tc:FindFirstChild("HumanoidRootPart"); local mr=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart")
        if tr and mr then mr.CFrame=tr.CFrame+Vector3.new(3,0,0) end
    end)
    mkAct2(pgTools,y,"TP → Me","Pull target here","Pull",Color3.fromRGB(62,20,120),function()
        local tc=selPlayer and selPlayer.Character; if not tc then return end
        local tr=tc:FindFirstChild("HumanoidRootPart"); local mr=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart")
        if tr and mr then tr.CFrame=mr.CFrame+Vector3.new(3,0,0) end
    end)
    mkAct2(pgTools,y,"Fling","Launch into sky","Fling",Color3.fromRGB(160,90,0),function() flingChar(selPlayer and selPlayer.Character) end)
    mkAct2(pgTools,y,"Strip Weapons","Remove all tools","Strip",Color3.fromRGB(70,35,90),function()
        local tc=selPlayer and selPlayer.Character; if not tc then return end
        for _,t in pairs(tc:GetChildren()) do if t:IsA("Tool") then t:Destroy() end end
        local bp=selPlayer and selPlayer:FindFirstChildOfClass("Backpack")
        if bp then for _,t in pairs(bp:GetChildren()) do if t:IsA("Tool") then t:Destroy() end end end
    end)

    mkSec2(pgTools,y,"fly target")
    flyTargetBtn=mkAct2(pgTools,y,"Fly Target","Makes selected player float","Fly",Color3.fromRGB(20,110,68),function()
        if not selPlayer then return end
        local active=toggleFlyOther(selPlayer)
        flyTargetBtn.Text=active and "Stop Fly" or "Fly"
        flyTargetBtn.BackgroundColor3=active and Color3.fromRGB(220,60,60) or Color3.fromRGB(20,110,68)
    end)

    mkSec2(pgTools,y,"jumpscare")
    local jsOn=false; local jsConn; local jsBtn
    jsBtn=mkAct2(pgTools,y,"Jumpscare","Random TPs + sound + flash","Start",Color3.fromRGB(130,45,0),function()
        jsOn=not jsOn
        if jsOn then
            jsBtn.Text="Stop"
            local fl=Instance.new("Frame"); fl.Size=UDim2.new(1,0,1,0); fl.BackgroundColor3=CR
            fl.BackgroundTransparency=1; fl.ZIndex=20; fl.Parent=SG
            local snd=Instance.new("Sound"); snd.SoundId="rbxassetid://9120802405"; snd.Volume=5; snd.Parent=workspace
            local t=0
            jsConn=RunService.Heartbeat:Connect(function()
                t=t+1; fl.BackgroundTransparency=t%5<2 and 0.35 or 1
                if t%6==0 then
                    local tc=selPlayer and selPlayer.Character; local mr=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart")
                    if tc and mr then local tr=tc:FindFirstChild("HumanoidRootPart"); if tr then tr.CFrame=mr.CFrame+Vector3.new(math.random(-15,15),math.random(5,20),math.random(-15,15)) end end
                end
                if t%35==0 then snd:Play() end
                if not jsOn then fl:Destroy(); snd:Destroy(); jsConn:Disconnect() end
            end)
        else jsBtn.Text="Start" end
    end)
    finPage("tools",y)
end

-- ── PLAYER ──────────────────────────────────────────────────
local pgPlayer=mkTabBtn("player","🧍","Player")
local setFlyTog,setNcTog,setGodTog,setIJTog,setInvisTog,setSpinTog,setBhopTog,setAFKTog
do
    local y={8}
    mkSec2(pgPlayer,y,"movement")
    setFlyTog  =mkTog2(pgPlayer,y,"Fly","WASD+Space+LCtrl  [F]",false,function(s) flyOn=s; if s then startFly() else stopFly() end end)
    setNcTog   =mkTog2(pgPlayer,y,"NoClip","Pass through walls  [N]",false,function(s) ncOn=s
        if s then ncConn=RunService.Stepped:Connect(function() local ch=lp.Character; if ch then for _,p in pairs(ch:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide=false end end end end)
        else if ncConn then ncConn:Disconnect(); ncConn=nil end; local ch=lp.Character; if ch then for _,p in pairs(ch:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide=true end end end end
    end)
    setBhopTog =mkTog2(pgPlayer,y,"Bunny Hop","Auto-jump on land  [B]",false,function(s) bhopOn=s
        if s then bhopConn=RunService.Heartbeat:Connect(function() local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid"); if h and h:GetState()==Enum.HumanoidStateType.Landed then h:ChangeState(Enum.HumanoidStateType.Jumping) end end)
        else if bhopConn then bhopConn:Disconnect(); bhopConn=nil end end
    end)
    setIJTog   =mkTog2(pgPlayer,y,"Infinite Jump",nil,false,function(s) infJump=s end)
    mkSec2(pgPlayer,y,"misc")
    setGodTog  =mkTog2(pgPlayer,y,"God Mode","SetStateEnabled(Dead,false)  [=]",false,function(s) godOn=s; if s then startGod() else stopGod() end end)
    setInvisTog=mkTog2(pgPlayer,y,"Invisible",nil,false,function(s) invisOn=s; applyInvis(s) end)
    setSpinTog =mkTog2(pgPlayer,y,"Spinbot",nil,false,function(s) spinOn=s
        if s then spinConn=RunService.RenderStepped:Connect(function() local r=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart"); if r then r.CFrame=r.CFrame*CFrame.Angles(0,math.rad(20),0) end end)
        else if spinConn then spinConn:Disconnect(); spinConn=nil end end
    end)
    setAFKTog  =mkTog2(pgPlayer,y,"Anti-AFK",nil,false,function(s) afkOn=s
        if s then afkConn=RunService.Heartbeat:Connect(function() VirtualUser:Button2Down(Vector2.new(0,0),cam.CFrame); task.wait(); VirtualUser:Button2Up(Vector2.new(0,0),cam.CFrame) end)
        else if afkConn then afkConn:Disconnect(); afkConn=nil end end
    end)
    mkSec2(pgPlayer,y,"stats")
    mkSld2(pgPlayer,y,"Walk Speed",   16,250,walkSpd,0,"",function(v) walkSpd=v; local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid"); if h then h.WalkSpeed=v end end)
    mkSld2(pgPlayer,y,"Jump Power",   50,500,jumpPwr,0,"",function(v) jumpPwr=v; local h=lp.Character and lp.Character:FindFirstChildOfClass("Humanoid"); if h then h.JumpPower=v end end)
    mkSld2(pgPlayer,y,"Fly Speed",    10,300,flySpd, 0,"",function(v) flySpd=v end)
    finPage("player",y)
end

-- ── MASS ────────────────────────────────────────────────────
local pgMass=mkTabBtn("mass","💥","Mass")
do
    local y={8}
    mkSec2(pgMass,y,"freeze")
    mkAct2(pgMass,y,"Freeze All","Anchor every player","Do It",Color3.fromRGB(14,72,132),function()
        for _,p in ipairs(Players:GetPlayers()) do if p~=lp then
            frozenMap[p]=true; local r=p.Character and p.Character:FindFirstChild("HumanoidRootPart"); if r then r.Anchored=true end
        end end
    end)
    mkAct2(pgMass,y,"Unfreeze All","Release all frozen players","Do It",Color3.fromRGB(18,105,65),function()
        for _,p in ipairs(Players:GetPlayers()) do
            frozenMap[p]=false; local r=p.Character and p.Character:FindFirstChild("HumanoidRootPart"); if r then r.Anchored=false end
        end
    end)
    mkSec2(pgMass,y,"combat")
    mkAct2(pgMass,y,"Kill All",nil,"Do It",CR,function() for _,p in ipairs(Players:GetPlayers()) do if p~=lp then killChar(p.Character) end end end)
    mkAct2(pgMass,y,"Fling All",nil,"Do It",Color3.fromRGB(145,75,0),function() for _,p in ipairs(Players:GetPlayers()) do if p~=lp then flingChar(p.Character) end end end)
    mkSec2(pgMass,y,"fly all")
    mkTog2(pgMass,y,"Fly All Players","Float every player upward",false,function(s)
        flyOthersAll=s
        if not s then
            for _,p in ipairs(Players:GetPlayers()) do pcall(function()
                local r=p.Character and p.Character:FindFirstChild("HumanoidRootPart"); if not r then return end
                local bv=r:FindFirstChild("_OFBV"); if bv then bv:Destroy() end
                local h=p.Character:FindFirstChildOfClass("Humanoid"); if h then h.PlatformStand=false end
            end) end
        end
    end)
    mkSec2(pgMass,y,"hitbox")
    mkTog2(pgMass,y,"Hitbox Expander","Enlarge enemy HumanoidRootParts",false,function(s)
        hitboxOn=s
        for _,p in ipairs(Players:GetPlayers()) do if p~=lp then pcall(function()
            local r=p.Character and p.Character:FindFirstChild("HumanoidRootPart"); if r then r.Size=s and Vector3.new(12,12,12) or Vector3.new(2,2,1) end
        end) end end
    end)
    finPage("mass",y)
end

-- ── WORLD ───────────────────────────────────────────────────
local pgWorld=mkTabBtn("world","🌍","World")
do
    local y={8}
    mkSec2(pgWorld,y,"lighting")
    mkTog2(pgWorld,y,"FullBright","Max ambient, no shadows",false,function(s)
        fbOn=s
        if s then
            Lighting.Ambient=CW; Lighting.OutdoorAmbient=CW; Lighting.Brightness=2; Lighting.GlobalShadows=false
            for _,v in pairs(Lighting:GetChildren()) do
                if v:IsA("BlurEffect") or v:IsA("SunRaysEffect") or v:IsA("ColorCorrectionEffect") then v.Enabled=false end
                if v:IsA("Atmosphere") then v.Density=0; v.Glare=0; v.Haze=0 end
            end
        else
            Lighting.Ambient=Color3.fromRGB(70,70,70); Lighting.OutdoorAmbient=Color3.fromRGB(100,100,100)
            Lighting.Brightness=1; Lighting.GlobalShadows=true
            for _,v in pairs(Lighting:GetChildren()) do
                if v:IsA("BlurEffect") or v:IsA("SunRaysEffect") or v:IsA("ColorCorrectionEffect") then v.Enabled=true end
            end
        end
    end)
    mkTog2(pgWorld,y,"No Fog","Remove atmospheric fog",false,function(s)
        fogOn=s; Lighting.FogEnd=s and 999999 or 1000; Lighting.FogStart=s and 999998 or 0
        for _,v in pairs(Lighting:GetChildren()) do if v:IsA("Atmosphere") then v.Density=s and 0 or 0.395; v.Haze=s and 0 or 0 end end
    end)
    mkSec2(pgWorld,y,"movement")
    mkTog2(pgWorld,y,"Click-TP","Left-click to teleport  [X]",false,function(s) clickTPOn=s end)
    finPage("world",y)
end

-- start on aimbot tab
switchTab("aimbot")

-- minimize/close
local minimized=false; local menuHidden=false
MinBtn.MouseButton1Click:Connect(function()
    minimized=not minimized; ConF.Visible=not minimized; Side.Visible=not minimized; sdiv.Visible=not minimized
    Main.Size=minimized and UDim2.new(0,WW,0,TH) or UDim2.new(0,WW,0,WH)
end)
CloseBtn.MouseButton1Click:Connect(function() SG:Destroy() end)

-- ── GIVE ITEM (uses game RemoteFunction) ──────────────────────────
local pgGiveItem = mkTabBtn("giveitem","📦","Give Item")
do
    local y = {8}

    local selectedPlayer = nil
    local selectedItem   = nil
    local giveAmount     = 1

    -- ── Status ──────────────────────────────────────────────────
    local statusLbl = Instance.new("TextLabel")
    statusLbl.Size = UDim2.new(1,-PP*2,0,18); statusLbl.Position = UDim2.new(0,PP,0,y[1])
    statusLbl.BackgroundTransparency=1; statusLbl.Font=Enum.Font.Gotham; statusLbl.TextSize=11
    statusLbl.TextColor3=CQ; statusLbl.TextXAlignment=Enum.TextXAlignment.Left
    statusLbl.Text="Pick a player → item → amount → Give."; statusLbl.TextWrapped=true
    statusLbl.Parent=pgGiveItem; y[1]=y[1]+22
    local function setStatus(msg,col,dur)
        statusLbl.Text=msg; statusLbl.TextColor3=col or CQ
        if dur then task.delay(dur,function() if statusLbl.Text==msg then statusLbl.Text="Pick a player → item → amount → Give."; statusLbl.TextColor3=CQ end end) end
    end

    -- ── Selection display row ───────────────────────────────────
    local dispRow = Instance.new("Frame")
    dispRow.Size=UDim2.new(1,-PP*2,0,30); dispRow.Position=UDim2.new(0,PP,0,y[1])
    dispRow.BackgroundColor3=Color3.fromRGB(20,28,50); dispRow.BorderSizePixel=0; dispRow.Parent=pgGiveItem
    Instance.new("UICorner",dispRow).CornerRadius=UDim.new(0,7)
    Instance.new("UIStroke",dispRow).Color=Color3.fromRGB(65,115,255)
    local dispLbl = Instance.new("TextLabel",dispRow)
    dispLbl.Size=UDim2.new(1,-8,1,0); dispLbl.Position=UDim2.new(0,8,0,0)
    dispLbl.BackgroundTransparency=1; dispLbl.Font=Enum.Font.GothamBold; dispLbl.TextSize=11
    dispLbl.TextColor3=Color3.fromRGB(160,190,255); dispLbl.TextXAlignment=Enum.TextXAlignment.Left
    dispLbl.Text="👤 — | 📦 — | ✕ 1"; dispLbl.Parent=dispRow
    y[1]=y[1]+34

    local function updateDisp()
        local pName = selectedPlayer and selectedPlayer.Name or "—"
        local iName = selectedItem or "—"
        dispLbl.Text = "👤 "..pName.."  |  📦 "..iName.."  |  ✕ "..giveAmount
    end

    -- ── Player list (including self) ────────────────────────────
    mkSec2(pgGiveItem, y, "1. select player")

    local plrScroll = Instance.new("ScrollingFrame")
    plrScroll.Size=UDim2.new(1,-PP*2,0,90); plrScroll.Position=UDim2.new(0,PP,0,y[1])
    plrScroll.BackgroundColor3=Color3.fromRGB(13,13,20); plrScroll.BorderSizePixel=0
    plrScroll.ScrollBarThickness=3; plrScroll.ScrollBarImageColor3=Color3.fromRGB(65,115,255)
    plrScroll.CanvasSize=UDim2.new(0,0,0,0); plrScroll.Parent=pgGiveItem
    Instance.new("UICorner",plrScroll).CornerRadius=UDim.new(0,8)
    Instance.new("UIListLayout",plrScroll).Padding=UDim.new(0,2)
    y[1]=y[1]+94

    local plrBtns={}
    local PLR_N=Color3.fromRGB(22,22,34); local PLR_S=Color3.fromRGB(25,70,25)

    local function buildPlrList()
        for _,b in ipairs(plrBtns) do pcall(function() b:Destroy() end) end; plrBtns={}
        local all=Players:GetPlayers(); plrScroll.CanvasSize=UDim2.new(0,0,0,#all*28)
        for idx,p in ipairs(all) do
            local isMe = p==lp
            local b=Instance.new("TextButton")
            b.Size=UDim2.new(1,0,0,26); b.BackgroundColor3=PLR_N; b.BorderSizePixel=0
            b.Text="  "..(isMe and "⭐ " or "")..p.Name..(isMe and " (You)" or "")
            b.Font=isMe and Enum.Font.GothamBold or Enum.Font.Gotham; b.TextSize=12
            b.TextColor3=isMe and Color3.fromRGB(255,210,80) or (p.Team and p.Team.TeamColor.Color or CW)
            b.TextXAlignment=Enum.TextXAlignment.Left; b.AutoButtonColor=false
            b.LayoutOrder=idx; b.Parent=plrScroll
            Instance.new("UICorner",b).CornerRadius=UDim.new(0,5)
            b.MouseButton1Click:Connect(function()
                for _,bb in ipairs(plrBtns) do bb.BackgroundColor3=PLR_N end
                b.BackgroundColor3=PLR_S; selectedPlayer=p; updateDisp()
                setStatus("Player: "..p.Name.." ✓  Now pick an item.",CA)
            end)
            table.insert(plrBtns,b)
        end
    end
    buildPlrList()
    Players.PlayerAdded:Connect(function() task.wait(0.1); buildPlrList() end)
    Players.PlayerRemoving:Connect(function() task.wait(0.2); buildPlrList() end)
    mkAct2(pgGiveItem,y,"","","↺",Color3.fromRGB(28,28,48),function() buildPlrList() end)

    -- ── Item list ───────────────────────────────────────────────
    mkSec2(pgGiveItem, y, "2. select item")

    -- ⚠️  EDIT THESE to match your game's exact item names
    local ITEMS = {
        -- Weapons
        "Sword","Knife","Gun","Rifle","Shotgun","Pistol","Sniper",
        "Rocket Launcher","Grenade","Bomb","Bat","Axe","Bow",
        -- Tools / Gear
        "Pickaxe","Shovel","Drill","Hammer","Wrench","Key",
        -- Resources / Currency
        "Gold","Diamond","Coin","Gem","Iron","Wood","Stone",
        -- Misc
        "Medkit","Shield","Armor","Potion","Food","Water",
    }

    local itemScroll = Instance.new("ScrollingFrame")
    itemScroll.Size=UDim2.new(1,-PP*2,0,120); itemScroll.Position=UDim2.new(0,PP,0,y[1])
    itemScroll.BackgroundColor3=Color3.fromRGB(13,13,20); itemScroll.BorderSizePixel=0
    itemScroll.ScrollBarThickness=3; itemScroll.ScrollBarImageColor3=Color3.fromRGB(65,115,255)
    itemScroll.CanvasSize=UDim2.new(0,0,0,#ITEMS*28); itemScroll.Parent=pgGiveItem
    Instance.new("UICorner",itemScroll).CornerRadius=UDim.new(0,8)
    local iLayout=Instance.new("UIListLayout",itemScroll); iLayout.Padding=UDim.new(0,2)
    y[1]=y[1]+124

    local itemBtns={}
    local ITEM_N=Color3.fromRGB(22,22,34); local ITEM_S=Color3.fromRGB(50,30,80)

    for idx,iname in ipairs(ITEMS) do
        local b=Instance.new("TextButton")
        b.Size=UDim2.new(1,0,0,26); b.BackgroundColor3=ITEM_N; b.BorderSizePixel=0
        b.Text="  "..iname; b.Font=Enum.Font.Gotham; b.TextSize=12; b.TextColor3=CW
        b.TextXAlignment=Enum.TextXAlignment.Left; b.AutoButtonColor=false
        b.LayoutOrder=idx; b.Parent=itemScroll
        Instance.new("UICorner",b).CornerRadius=UDim.new(0,5)
        b.MouseButton1Click:Connect(function()
            for _,bb in ipairs(itemBtns) do bb.BackgroundColor3=ITEM_N; bb.TextColor3=CW end
            b.BackgroundColor3=ITEM_S; b.TextColor3=Color3.fromRGB(200,160,255)
            selectedItem=iname; updateDisp()
            setStatus("Item: "..iname.." ✓  Set amount and Give.",CA)
        end)
        table.insert(itemBtns,b)
    end

    -- ── Amount slider ───────────────────────────────────────────
    mkSec2(pgGiveItem, y, "3. amount")
    mkSld2(pgGiveItem, y, "Amount", 1, 100, 1, 0, "", function(v)
        giveAmount = math.floor(v); updateDisp()
    end)

    -- ── Give button ─────────────────────────────────────────────
    local giveRow=Instance.new("Frame")
    giveRow.Size=UDim2.new(1,-PP*2,0,40); giveRow.Position=UDim2.new(0,PP,0,y[1])
    giveRow.BackgroundTransparency=1; giveRow.Parent=pgGiveItem; y[1]=y[1]+44

    local giveBtn=Instance.new("TextButton",giveRow)
    giveBtn.Size=UDim2.new(1,0,1,0); giveBtn.BackgroundColor3=Color3.fromRGB(48,160,80)
    giveBtn.BorderSizePixel=0; giveBtn.Text="🎁  Give Item"; giveBtn.Font=Enum.Font.GothamBold
    giveBtn.TextSize=14; giveBtn.TextColor3=CW; giveBtn.AutoButtonColor=false
    Instance.new("UICorner",giveBtn).CornerRadius=UDim.new(0,8)
    giveBtn.MouseEnter:Connect(function() TweenSvc:Create(giveBtn,TweenInfo.new(0.12),{BackgroundColor3=Color3.fromRGB(65,200,100)}):Play() end)
    giveBtn.MouseLeave:Connect(function() TweenSvc:Create(giveBtn,TweenInfo.new(0.12),{BackgroundColor3=Color3.fromRGB(48,160,80)}):Play() end)

    giveBtn.MouseButton1Click:Connect(function()
        if not selectedPlayer then setStatus("❌  Select a player first!", CR, 3); return end
        if not selectedItem   then setStatus("❌  Select an item first!",  CR, 3); return end

        giveBtn.Text="⏳  Giving..."; giveBtn.BackgroundColor3=CQ
        setStatus("⏳  Giving "..giveAmount.."x "..selectedItem.." to "..selectedPlayer.Name.."...", CQ)

        local ok, err = pcall(function()
            game.ReplicatedStorage.Cheats.GiveItems:Invoke(
                selectedPlayer,   -- Player object
                selectedItem,     -- Item name string
                tonumber(giveAmount) -- Amount as number
            )
        end)

        if ok then
            setStatus("✅  Gave "..giveAmount.."x "..selectedItem.." → "..selectedPlayer.Name.."!", CG, 5)
        else
            setStatus("❌  Failed: "..tostring(err):sub(1,60), CR, 6)
        end

        giveBtn.Text="🎁  Give Item"; giveBtn.BackgroundColor3=Color3.fromRGB(48,160,80)
    end)

    finPage("giveitem", y)
end


-- ============================================================
-- AIMBOT + ESP DRAWING SYSTEM
-- ============================================================
local fovCircle=Drawing.new("Circle"); fovCircle.Visible=false; fovCircle.Radius=aimFov
fovCircle.Color=CW; fovCircle.Thickness=1.5; fovCircle.Filled=false; fovCircle.Transparency=0.5

local function scrCtr() return Vector2.new(cam.ViewportSize.X/2,cam.ViewportSize.Y/2) end
local function isAimEnemy(p) if not skipTeamAim then return true end; if not lp.Team or not p.Team then return true end; return lp.Team~=p.Team end

local function canSee(pos)
    local params=RaycastParams.new(); params.FilterDescendantsInstances={lp.Character or workspace}; params.FilterType=Enum.RaycastFilterType.Exclude
    local res=workspace:Raycast(cam.CFrame.Position,pos-cam.CFrame.Position,params); if not res then return true end
    for _,p in ipairs(Players:GetPlayers()) do if p.Character and res.Instance:IsDescendantOf(p.Character) then return true end end
    return false
end

local function predictPos(root,part)
    if aimPred<=0 then return part.Position end
    local ok,vel=pcall(function() return root.AssemblyLinearVelocity end)
    return part.Position+(ok and vel or Vector3.zero)*aimPred
end

local function isStillValid(p)
    if not p or not p.Character then return false end
    local ch=p.Character; local h=ch:FindFirstChildOfClass("Humanoid")
    local pt=ch:FindFirstChild(aimbotBone) or ch:FindFirstChild("HumanoidRootPart")
    local rt=ch:FindFirstChild("HumanoidRootPart")
    if not pt or not h or h.Health<=0 or not isAimEnemy(p) then return false end
    if rt and myRoot and (rt.Position-myRoot.Position).Magnitude>aimMaxD then return false end
    local sp,on=cam:WorldToScreenPoint(pt.Position)
    return on and (Vector2.new(sp.X,sp.Y)-scrCtr()).Magnitude<aimFov*2
end

local function getBestTarget()
    if lockOnOn and lockTgt and isStillValid(lockTgt) then return lockTgt end; lockTgt=nil
    local ctr=scrCtr(); local bestD=aimFov; local bestP=nil
    for _,p in ipairs(Players:GetPlayers()) do
        if p~=lp and isAimEnemy(p) and p.Character then
            local ch=p.Character; local h=ch:FindFirstChildOfClass("Humanoid")
            local pt=ch:FindFirstChild(aimbotBone) or ch:FindFirstChild("HumanoidRootPart"); local rt=ch:FindFirstChild("HumanoidRootPart")
            if pt and h and h.Health>0 and rt then
                if myRoot and (rt.Position-myRoot.Position).Magnitude>aimMaxD then continue end
                local sp,on=cam:WorldToScreenPoint(pt.Position)
                if on then local d=(Vector2.new(sp.X,sp.Y)-ctr).Magnitude
                    if d<bestD then if not visOnly or canSee(pt.Position) then bestD=d; bestP=p end end
                end
            end
        end
    end
    if lockOnOn and bestP then lockTgt=bestP end; return bestP
end

-- ESP Drawing creation
local function mkESPDraw(p)
    local box=Drawing.new("Square"); box.Visible=false; box.Thickness=1.5; box.Filled=false; box.Color=espClr
    local nameT=Drawing.new("Text"); nameT.Visible=false; nameT.Size=13; nameT.Center=true; nameT.Outline=true
    nameT.OutlineColor=Color3.fromRGB(0,0,0); nameT.Color=CW; nameT.Text=p.Name
    local hpBg=Drawing.new("Square"); hpBg.Visible=false; hpBg.Filled=true; hpBg.Color=Color3.fromRGB(20,20,20)
    local hpFill=Drawing.new("Square"); hpFill.Visible=false; hpFill.Filled=true; hpFill.Color=CG
    local infoT=Drawing.new("Text"); infoT.Visible=false; infoT.Size=11; infoT.Center=true
    infoT.Outline=true; infoT.OutlineColor=Color3.fromRGB(0,0,0); infoT.Color=CQ
    espDrws[p]={box=box,nameT=nameT,hpBg=hpBg,hpFill=hpFill,infoT=infoT}
end

local function removeESPDraw(p)
    if espDrws[p] then for _,d in pairs(espDrws[p]) do pcall(function() d:Remove() end) end; espDrws[p]=nil end
end

Players.PlayerRemoving:Connect(removeESPDraw)

local function getBox(char)
    local root = char:FindFirstChild("HumanoidRootPart")
    if not root then return nil end
    local rSP = cam:WorldToScreenPoint(root.Position)
    if rSP.Z < 0.5 then return nil end  -- behind camera

    local head = char:FindFirstChild("Head")

    -- Sample multiple world points and project to screen
    -- This handles any camera angle and avoids Y-inversion bugs
    local pts = {
        root.Position + Vector3.new( 0,  -3.2, 0),  -- feet
        root.Position + Vector3.new( 0,   0,   0),  -- hip/center
        root.Position + Vector3.new( 0.8, 0,   0),  -- right shoulder
        root.Position + Vector3.new(-0.8, 0,   0),  -- left shoulder
    }
    if head then
        table.insert(pts, head.Position + Vector3.new(0, head.Size.Y/2 + 0.15, 0)) -- head top
        table.insert(pts, head.Position)                                              -- head center
    else
        table.insert(pts, root.Position + Vector3.new(0, 2.8, 0))                   -- estimated head
    end

    local minX, minY =  math.huge,  math.huge
    local maxX, maxY = -math.huge, -math.huge
    local any = false

    for _, p in ipairs(pts) do
        local sp = cam:WorldToScreenPoint(p)
        if sp.Z > 0.1 then
            any = true
            if sp.X < minX then minX = sp.X end
            if sp.X > maxX then maxX = sp.X end
            if sp.Y < minY then minY = sp.Y end
            if sp.Y > maxY then maxY = sp.Y end
        end
    end

    if not any then return nil end

    local bh = maxY - minY
    if bh < 8 then return nil end

    -- Widen box horizontally — point sampling underestimates width
    local cx  = (minX + maxX) * 0.5
    local estW = math.max(maxX - minX, bh * 0.45)
    minX = cx - estW / 2
    maxX = cx + estW / 2

    local hum  = char:FindFirstChildOfClass("Humanoid")
    local hp   = hum and hum.Health or 0
    local mhp  = hum and math.max(hum.MaxHealth, 1) or 1
    local dist = myRoot and math.floor((myRoot.Position - root.Position).Magnitude) or 0

    -- 4px padding around the sampled bounds
    return {
        x   = minX - 4,
        y   = minY - 4,
        w   = (maxX - minX) + 8,
        h   = bh + 8,
        cx  = cx,
        dist= dist,
        hp  = hp, mhp = mhp, hpr = hp / mhp
    }
end

-- ============================================================
-- MASTER LOOP
-- ============================================================
RunService.RenderStepped:Connect(function()
    local mc=lp.Character; myRoot=mc and mc:FindFirstChild("HumanoidRootPart")

    -- FOV circle
    if fovCircle.Visible then fovCircle.Position=scrCtr() end

    -- ── AIMBOT (RMB to activate) ─────────────────────────────
    if aimbotOn then
        local rmb=UIS:IsMouseButtonPressed(Enum.UserInputType.MouseButton2)
        fovCircle.Color=CW
        if rmb then
            local tgt=getBestTarget()
            if tgt then
                fovCircle.Color=CR
                if aimTargetLbl then aimTargetLbl.Text="🎯  "..tgt.Name end
                local ch=tgt.Character; if ch then
                    local rt=ch:FindFirstChild("HumanoidRootPart"); local pt=ch:FindFirstChild(aimbotBone) or rt
                    if rt and pt then
                        local aimPos=predictPos(rt,pt)
                        local tCF=CFrame.lookAt(cam.CFrame.Position,aimPos)
                        cam.CFrame=silentOn and tCF or cam.CFrame:Lerp(tCF,aimSmooth)
                    end
                end
            else if aimTargetLbl then aimTargetLbl.Text="No target in FOV" end end
        else if aimTargetLbl then aimTargetLbl.Text="Hold RMB to aim" end end
    end

    -- ── ESP ──────────────────────────────────────────────────
    local rmbHeld=UIS:IsMouseButtonPressed(Enum.UserInputType.MouseButton2)
    local showESP2=espOn and (not espRMBOnly or rmbHeld)

    if espOn then
        for _,p in ipairs(Players:GetPlayers()) do
            if p~=lp then
                local enemy=not espTeam or not(lp.Team and p.Team and lp.Team==p.Team)
                if enemy and not espDrws[p] then mkESPDraw(p) end
                if not enemy and espDrws[p] then removeESPDraw(p) end
            end
        end
    end

    for p,dr in pairs(espDrws) do pcall(function()
        if not espOn or not showESP2 then
            dr.box.Visible=false; dr.nameT.Visible=false; dr.hpBg.Visible=false; dr.hpFill.Visible=false; dr.infoT.Visible=false; return
        end
        local ch=p.Character; if not ch then dr.box.Visible=false; dr.nameT.Visible=false; dr.hpBg.Visible=false; dr.hpFill.Visible=false; dr.infoT.Visible=false; return end
        local b=getBox(ch); if not b then dr.box.Visible=false; dr.nameT.Visible=false; dr.hpBg.Visible=false; dr.hpFill.Visible=false; dr.infoT.Visible=false; return end
        dr.box.Position=Vector2.new(b.x,b.y); dr.box.Size=Vector2.new(b.w,b.h); dr.box.Color=espClr; dr.box.Visible=true
        if espName then dr.nameT.Position=Vector2.new(b.cx,b.y-16); dr.nameT.Text=p.Name; dr.nameT.Visible=true else dr.nameT.Visible=false end
        if espInfo then dr.infoT.Position=Vector2.new(b.cx,b.y+b.h+3); dr.infoT.Text=b.dist.."m  ❤"..math.floor(b.hp); dr.infoT.Visible=true else dr.infoT.Visible=false end
        if espHP then
            local bw2=4; local bx=b.x-bw2-3
            dr.hpBg.Position=Vector2.new(bx,b.y); dr.hpBg.Size=Vector2.new(bw2,b.h); dr.hpBg.Visible=true
            local fillH=b.h*b.hpr; local hpCol=Color3.fromRGB(math.floor(255*(1-b.hpr)),math.floor(255*b.hpr),50)
            dr.hpFill.Position=Vector2.new(bx,b.y+b.h-fillH); dr.hpFill.Size=Vector2.new(bw2,fillH); dr.hpFill.Color=hpCol; dr.hpFill.Visible=true
        else dr.hpBg.Visible=false; dr.hpFill.Visible=false end
    end) end
end)

-- ============================================================
-- KEYBINDS
-- ============================================================
UIS.InputBegan:Connect(function(i,gpe)
    if gpe then return end; local k=i.KeyCode
    if k==Enum.KeyCode.F then flyOn=not flyOn; if flyOn then startFly() else stopFly() end; setFlyTog(flyOn)
    elseif k==Enum.KeyCode.N then ncOn=not ncOn; setNcTog(ncOn)
    elseif k==Enum.KeyCode.Equals then godOn=not godOn; if godOn then startGod() else stopGod() end; setGodTog(godOn)
    elseif k==Enum.KeyCode.Z then aimbotOn=not aimbotOn; fovCircle.Visible=aimbotOn; setAimTog(aimbotOn)
    elseif k==Enum.KeyCode.B then setBhopTog(not bhopOn)
    elseif k==Enum.KeyCode.X then clickTPOn=not clickTPOn
    elseif k==Enum.KeyCode.E then
        espOn=not espOn; setESPTog(espOn)
        if not espOn then for p,_ in pairs(espDrws) do removeESPDraw(p) end end
    elseif k==Enum.KeyCode.G then
        if not selPlayer then return end; frozenMap[selPlayer]=not frozenMap[selPlayer]
        local r=selPlayer.Character and selPlayer.Character:FindFirstChild("HumanoidRootPart"); if r then r.Anchored=frozenMap[selPlayer] end
    elseif k==Enum.KeyCode.K then killChar(selPlayer and selPlayer.Character)
    elseif k==Enum.KeyCode.T then
        local tc=selPlayer and selPlayer.Character; if not tc then return end
        local tr=tc:FindFirstChild("HumanoidRootPart"); local mr=lp.Character and lp.Character:FindFirstChild("HumanoidRootPart")
        if tr and mr then mr.CFrame=tr.CFrame+Vector3.new(3,0,0) end
    elseif k==Enum.KeyCode.H then
        menuHidden=not menuHidden; Main.Visible=not menuHidden
        if not menuHidden then fovCircle.Visible=aimbotOn end
    end
end)

print("[ScrollMenu v7] Loaded ✓  |  H=hide  Z=aimbot  E=esp")

Features & Information

It Has Aimbot Esp Tools Player Pause and Mass Control The world And world Movment

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts