-- v5 compact | Aimbot + ESP + Hitbox + Character + Draggable Button local P=game:GetService("Players")local R=game:GetService("RunService") local U=game:GetService("UserInputService")local W=game:GetService("Workspace") local C=W.CurrentCamera local L=P.LocalPlayer local CFG={ Aimbot={Enabled=false,Targets="Both",AimPart="Head",FOV=120,Smoothness=5,TeamCheck=true,WallCheck=true,MaxDistance=1000}, ESP={PlayersEnabled=false,BotsEnabled=false,PlayerColor=Color3.fromRGB(255,70,70),BotColor=Color3.fromRGB(70,255,130),FillT=0.3,OutlineT=0}, Char={Enabled=false,Targets="Both",ApplyTo="Head",Color=Color3.fromRGB(255,0,255),Transparency=0.5,HeadSize=1}, Hitbox={Enabled=false,Targets="Both",Size=3,Transparency=0.5,TeamCheck=true}, Button={Color=Color3.fromRGB(30,30,30),Transparency=0.3,ActiveColor=Color3.fromRGB(200,50,50),Draggable=false}, } local aimOn=false local function ps(o)if type(o)=="table"then return o[1]or""end return tostring(o)end local function hum(c)return c and c:FindFirstChildOfClass("Humanoid")end local function root(c)if not c then return nil end return c:FindFirstChild("HumanoidRootPart")or c.PrimaryPart or c:FindFirstChildWhichIsA("BasePart")end local function aimPart(c,n) if not c then return nil end local p=c:FindFirstChild(n)if p and p:IsA("BasePart")then return p end for _,x in ipairs({"Head","HumanoidRootPart","UpperTorso","Torso"})do local q=c:FindFirstChild(x)if q and q:IsA("BasePart")then return q end end return c:FindFirstChildWhichIsA("BasePart") end local function isBot(m) if not m or not m:IsA("Model")then return false end if not m:FindFirstChildOfClass("Humanoid")then return false end if P:GetPlayerFromCharacter(m)then return false end return true end local function collectBots() local t={}local function scan(c) for _,o in ipairs(c:GetChildren())do if o:IsA("Model")and isBot(o)then table.insert(t,o) elseif o:IsA("Folder")or o:IsA("Model")then scan(o)end end end scan(W)return t end local rp=RaycastParams.new()rp.FilterType=Enum.RaycastFilterType.Exclude rp.IgnoreWater=true local function los(ch,ap,chk) if not chk then return true end if not ch or not ap then return false end local o=C.CFrame.Position local d=ap.Position-o local ig={L.Character,C} for _,x in ipairs(W:GetDescendants())do if x.Name=="MESP_HL"then table.insert(ig,x)end end rp.FilterDescendantsInstances=ig local r=W:Raycast(o,d,rp) if not r then return true end return r.Instance:IsDescendantOf(ch) end local function gather(mode) local t={}local mr=root(L.Character) if mode=="Players"or mode=="Both"then for _,pl in ipairs(P:GetPlayers())do if pl~=L and pl.Character then local c=pl.Character local h=hum(c)local a=aimPart(c,CFG.Aimbot.AimPart) if h and h.Health>0 and a then local sk=false if CFG.Aimbot.TeamCheck and pl.Team and L.Team and pl.Team==L.Team then sk=true end if not sk and mr and(mr.Position-a.Position).Magnitude>CFG.Aimbot.MaxDistance then sk=true end if not sk then table.insert(t,{Character=c,Humanoid=h,AimPart=a,IsBot=false,Name=pl.Name,Player=pl})end end end end end if mode=="Bots"or mode=="Both"then for _,b in ipairs(collectBots())do local h=hum(b)local a=aimPart(b,CFG.Aimbot.AimPart) if h and h.Health>0 and a then local sk=false if mr and(mr.Position-a.Position).Magnitude>CFG.Aimbot.MaxDistance then sk=true end if not sk then table.insert(t,{Character=b,Humanoid=h,AimPart=a,IsBot=true,Name=b.Name,Player=nil})end end end end return t end local function closest() local cen=Vector2.new(C.ViewportSize.X/2,C.ViewportSize.Y/2)local best,bd=nil,CFG.Aimbot.FOV for _,e in ipairs(gather(CFG.Aimbot.Targets))do local sp,on=C:WorldToViewportPoint(e.AimPart.Position) if on then local d=(Vector2.new(sp.X,sp.Y)-cen).Magnitude if d