local Players, RunService, UIS = game:GetService("Players"), game:GetService("RunService"), game:GetService("UserInputService") local LP = Players.LocalPlayer or Players.PlayerAdded:Wait() local function cam() return workspace.CurrentCamera end local CFG = { Aim = true, Enem = true, Aliad = false, XRay = true, Sticky = true, Wall = true, NeedTool = true, PauseDriving = true, AimInVehicle = true, Tracer = true, AimMode = 1, FOV = 165, Smooth = 0.72, Pred = 0.11, Dist = 650, MaxHL = 12, Rate = 0.15, HitEvery = 3 } local AIM_MODES, CAD_MODES = {"CABEZA", "TORSO", "AUTO"}, {1, 2, 3, 4} local cadIdx, lockedPlr, esp, cache, conns = 3, nil, {}, {}, {} CFG.HitEvery = CAD_MODES[cadIdx] local rayP = RaycastParams.new(); rayP.FilterType = Enum.RaycastFilterType.Exclude; rayP.IgnoreWater = true local ATTR = {"Team","Faction","Ally","Allies","Gang","Squad","Group","Role","Side","Class","Bando"} local KEY_SET = {}; for _, k in ipairs(ATTR) do KEY_SET[k] = true end local ACCENT = {["á"]="a",["é"]="e",["í"]="i",["ó"]="o",["ú"]="u",["ñ"]="n",["ü"]="u"} local function norm(s) local o = string.lower((tostring(s or "")):gsub("^%s*(.-)%s*$", "%1")) return (o:gsub("[%z\1-\127\194-\244][\128-\191]*", function(c) return ACCENT[c] or c end)):gsub("%s+", " ") end local function isGrpTag(t) for k in pairs(t) do if k == "grupo" or k:sub(1, 6) == "grupo " then return true end end return false end local function delESP(p) local e = esp[p]; if not e then return end if e.bb then pcall(function() e.bb:Destroy() end) end if e.hl then pcall(function() e.hl:Destroy() end) end esp[p] = nil end local function clearP(p) cache[p] = nil; if lockedPlr == p then lockedPlr = nil end; delESP(p) if p == LP then table.clear(cache); for k in pairs(esp) do delESP(k) end end end local function readLabels(p) local out, name = {}, "SIN BANDO" if not p then return out, name end if p.Team and norm(p.Team.Name) ~= "" then local r = tostring(p.Team.Name); out[norm(r)] = true; name = string.upper(r) end for _, k in ipairs(ATTR) do for _, v in ipairs({p:GetAttribute(k), p:FindFirstChild(k), p.Character and p.Character:GetAttribute(k), p.Character and p.Character:FindFirstChild(k)}) do if v ~= nil then local r = typeof(v) == "Instance" and (v:IsA("Team") and v.Name or v:IsA("StringValue") and v.Value or (v:IsA("ObjectValue") and v.Value and v.Value.Name)) or tostring(v) local n = norm(r) if r and n ~= "" then out[n] = true; if name == "SIN BANDO" then name = string.upper(r) end end end end end return out, name end local function metaOf(p) if not p or p == LP then return nil, "YO", true end local c = cache[p]; if c then return c.l, c.n, c.a end local ml, pl, name = readLabels(LP), readLabels(p) local same = (LP.Team and p.Team and LP.Team == p.Team) or false if not same then for k in pairs(ml) do if pl[k] then same = true; break end end end local ally = isGrpTag(ml) and same or (not isGrpTag(pl)) cache[p] = {l = pl, n = name, a = ally}; return pl, name, ally end local function isAlly(p) local _, _, a = metaOf(p); return a end local function seatMdl(hum) local s = hum and hum.SeatPart; return s and (s:FindFirstAncestorOfClass("Model") or s), s and s:IsA("VehicleSeat") end local function trk(c) conns[#conns + 1] = c; return c end local function watch(inst, owner) if not inst then return end for _, k in ipairs(ATTR) do trk(inst:GetAttributeChangedSignal(k):Connect(function() clearP(owner) end)) end local function bVal(ch) if KEY_SET[ch.Name] and (ch:IsA("StringValue") or ch:IsA("ObjectValue")) then trk(ch.Changed:Connect(function() clearP(owner) end)); clearP(owner) end end for _, ch in ipairs(inst:GetChildren()) do bVal(ch) end trk(inst.ChildAdded:Connect(bVal)) trk(inst.ChildRemoved:Connect(function(ch) if KEY_SET[ch.Name] then clearP(owner) end end)) end local function hookP(p) trk(p:GetPropertyChangedSignal("Team"):Connect(function() clearP(p) end)) watch(p, p); if p.Character then watch(p.Character, p) end trk(p.CharacterAdded:Connect(function(c) watch(c, p); clearP(p) end)) if p ~= LP then trk(p.CharacterRemoving:Connect(function() clearP(p) end)) end end for _, p in ipairs(Players:GetPlayers()) do hookP(p) end hookP(LP); trk(Players.PlayerAdded:Connect(hookP)); trk(Players.PlayerRemoving:Connect(clearP)) local function canAim(c0) if not CFG.Aim or not c0 or c0.CameraType == Enum.CameraType.Scriptable then return false, "OFF" end local ch = LP.Character; if not ch or not ch.Parent then return false, "SIN PJ" end local hum = ch:FindFirstChildOfClass("Humanoid"); if not hum or hum.Health <= 0 then return false, "MUERTO" end local _, drv = seatMdl(hum) if CFG.PauseDriving and drv then return false, "AUTO" end if CFG.NeedTool and not ch:FindFirstChildOfClass("Tool") then return false, "SIN ARMA" end return true, "LISTO", hum end local function targetOf(p) if isAlly(p) then if lockedPlr == p then lockedPlr = nil end; return nil end local c = p.Character; if not c or not c.Parent then return nil end local h = c:FindFirstChildOfClass("Humanoid") local r = c:FindFirstChild("HumanoidRootPart") or c:FindFirstChild("UpperTorso") or c:FindFirstChild("Torso") local hd = c:FindFirstChild("Head") or r if not h or not r or not hd or h.Health <= 0 or (not CFG.AimInVehicle and h.SeatPart) then return nil end return c, h, r, hd end local oldG = (type(gethui) == "function" and gethui():FindFirstChild("000HUD")) or (LP:FindFirstChildOfClass("PlayerGui") and LP.PlayerGui:FindFirstChild("000HUD")) if oldG then pcall(function() oldG:Destroy() end) end local gui = Instance.new("ScreenGui"); gui.Name, gui.ResetOnSpawn, gui.IgnoreGuiInset, gui.DisplayOrder = "000HUD", false, true, 999999 local okH, hGui = pcall(function() return type(gethui) == "function" and gethui() end) gui.Parent = (okH and hGui) or LP:FindFirstChildOfClass("PlayerGui") or LP:WaitForChild("PlayerGui", 5) local fov = Instance.new("Frame"); fov.AnchorPoint, fov.Position, fov.BackgroundTransparency, fov.Parent = Vector2.new(0.5,0.5), UDim2.fromScale(0.5,0.5), 1, gui Instance.new("UICorner", fov).CornerRadius = UDim.new(1,0) local fStroke = Instance.new("UIStroke"); fStroke.Thickness, fStroke.Color, fStroke.Parent = 1.5, Color3.new(1,1,1), fov local tracer = Instance.new("Frame"); tracer.AnchorPoint, tracer.BorderSizePixel, tracer.BackgroundColor3, tracer.BackgroundTransparency, tracer.Visible, tracer.Parent = Vector2.new(0.5,0.5), 0, Color3.fromRGB(255,65,65), 0.25, false, gui local wCol, darkBg = Color3.fromRGB(255,255,255), Color3.fromRGB(16,18,24) -- Ícono fantasmita inicial movible (abre toda la HUD al hundirlo) local ghostIcon = Instance.new("Frame"); ghostIcon.Size, ghostIcon.Position, ghostIcon.BackgroundColor3, ghostIcon.BackgroundTransparency, ghostIcon.ZIndex, ghostIcon.Parent = UDim2.fromOffset(52,58), UDim2.fromOffset(180, 90), darkBg, 0.12, 20, gui Instance.new("UICorner", ghostIcon).CornerRadius = UDim.new(0,12) local giStroke = Instance.new("UIStroke"); giStroke.Thickness, giStroke.Color, giStroke.Parent = 1.4, wCol, ghostIcon local function addGhostShape(parent, scale, bgCut) local function mk(sz, pos, col, tr, z, rad) local f = Instance.new("Frame"); f.Size, f.Position, f.BackgroundColor3, f.BackgroundTransparency, f.BorderSizePixel, f.ZIndex, f.Parent = UDim2.fromOffset(sz[1]*scale, sz[2]*scale), UDim2.fromOffset(pos[1]*scale, pos[2]*scale), col, tr, 0, z, parent if rad then Instance.new("UICorner", f).CornerRadius = UDim.new(1,0) end return f end mk({90,90}, {13,6}, wCol, 0.1, 21, true) mk({90,42}, {13,52}, wCol, 0.1, 21) mk({30,22}, {13,83}, wCol, 0.1, 21, true) mk({30,22}, {43,83}, bgCut, 0, 21, true) mk({30,22}, {73,83}, wCol, 0.1, 21, true) mk({13,17}, {36,36}, darkBg, 0, 22, true) mk({13,17}, {66,36}, darkBg, 0, 22, true) end addGhostShape(ghostIcon, 0.45, darkBg) local iconHit = Instance.new("TextButton") iconHit.Size, iconHit.BackgroundTransparency, iconHit.Text, iconHit.Active, iconHit.ZIndex, iconHit.Parent = UDim2.fromScale(1,1), 1, "", true, 25, ghostIcon -- HUD principal 000 (inicia oculto hasta hundir el fantasmita) local box = Instance.new("Frame"); box.Size, box.Position, box.BackgroundColor3, box.BackgroundTransparency, box.ClipsDescendants, box.Visible, box.Parent = UDim2.fromOffset(252,226), UDim2.fromOffset(120, 40), darkBg, 0.14, true, false, gui Instance.new("UICorner", box).CornerRadius = UDim.new(0,8) Instance.new("UIStroke", box).Color = Color3.fromRGB(70,80,105) -- Fantasma blanco de fondo dentro del HUD local ghost = Instance.new("Frame"); ghost.Size, ghost.Position, ghost.BackgroundTransparency, ghost.ZIndex, ghost.Parent = UDim2.fromOffset(116,124), UDim2.new(0.5,-58,0.5,-50), 1, 0, box local function gPart(sz, pos, col, tr, z, rad) local f = Instance.new("Frame"); f.Size, f.Position, f.BackgroundColor3, f.BackgroundTransparency, f.BorderSizePixel, f.ZIndex, f.Parent = sz, pos, col, tr, 0, z, ghost if rad then Instance.new("UICorner", f).CornerRadius = UDim.new(1,0) end return f end gPart(UDim2.fromOffset(90,90), UDim2.fromOffset(13,6), wCol, 0.86, 0, true) gPart(UDim2.fromOffset(90,42), UDim2.fromOffset(13,52), wCol, 0.86, 0) gPart(UDim2.fromOffset(30,22), UDim2.fromOffset(13,83), wCol, 0.86, 0, true) gPart(UDim2.fromOffset(30,22), UDim2.fromOffset(43,83), darkBg, 0.14, 0, true) gPart(UDim2.fromOffset(30,22), UDim2.fromOffset(73,83), wCol, 0.86, 0, true) gPart(UDim2.fromOffset(13,17), UDim2.fromOffset(36,36), wCol, 0.78, 1, true) gPart(UDim2.fromOffset(13,17), UDim2.fromOffset(66,36), wCol, 0.78, 1, true) local top = Instance.new("TextLabel"); top.Size, top.Position, top.BackgroundTransparency, top.ZIndex, top.Text, top.TextColor3, top.Font, top.TextSize, top.TextXAlignment, top.Active, top.Parent = UDim2.new(1,-56,0,22), UDim2.fromOffset(8,0), 1, 2, "000", wCol, Enum.Font.GothamBlack, 12, Enum.TextXAlignment.Left, true, box local function topBtn(txt, x, col) local b = Instance.new("TextButton"); b.Size, b.Position, b.BackgroundColor3, b.ZIndex, b.Text, b.TextColor3, b.Font, b.TextSize, b.Parent = UDim2.fromOffset(22,18), UDim2.new(1,x,0,2), col, 3, txt, wCol, Enum.Font.GothamBold, 11, box Instance.new("UICorner", b).CornerRadius = UDim.new(0,5); return b end local mini, closeB = topBtn("-", -50, Color3.fromRGB(45,50,65)), topBtn("X", -25, Color3.fromRGB(165,45,45)) local body = Instance.new("Frame"); body.Size, body.Position, body.BackgroundTransparency, body.ZIndex, body.Parent = UDim2.new(1,0,1,-22), UDim2.fromOffset(0,22), 1, 2, box local info = Instance.new("TextLabel"); info.Size, info.Position, info.BackgroundTransparency, info.ZIndex, info.Text, info.TextColor3, info.Font, info.TextSize, info.TextXAlignment, info.Parent = UDim2.new(1,-14,0,18), UDim2.fromOffset(7,0), 1, 3, "Listo", Color3.fromRGB(220,225,235), Enum.Font.GothamMedium, 10, Enum.TextXAlignment.Left, body local function btn(txt, x, y, w, col) local b = Instance.new("TextButton"); b.Size, b.Position, b.BackgroundColor3, b.BackgroundTransparency, b.ZIndex, b.Text, b.TextColor3, b.Font, b.TextSize, b.Parent = UDim2.fromOffset(w,22), UDim2.fromOffset(x,y), col, 0.14, 3, txt, wCol, Enum.Font.GothamBold, 9, body Instance.new("UICorner", b).CornerRadius = UDim.new(0,6); return b end local bAim = btn("",6,20,76,Color3.fromRGB(40,145,80)); local bEn = btn("",88,20,76,Color3.fromRGB(180,55,55)); local bAl = btn("",170,20,76,Color3.fromRGB(45,145,85)) local bWall = btn("",6,46,76,Color3.fromRGB(160,100,30)); local bM = btn("",88,46,76,Color3.fromRGB(50,55,70)); local bP = btn("",170,46,76,Color3.fromRGB(50,55,70)) local bSmM = btn("",6,72,76,Color3.fromRGB(55,65,85)); local bSmP = btn("",88,72,76,Color3.fromRGB(55,65,85)); local bCad = btn("",170,72,76,Color3.fromRGB(95,70,150)) local bPart = btn("",6,98,117,Color3.fromRGB(65,95,145)); local bPrM = btn("",129,98,56,Color3.fromRGB(55,65,85)); local bPrP = btn("",190,98,56,Color3.fromRGB(55,65,85)) local bXray = btn("",6,124,76,Color3.fromRGB(130,60,145)); local bStick = btn("",88,124,76,Color3.fromRGB(45,120,115)); local bVeh = btn("",170,124,76,Color3.fromRGB(45,110,145)) local bTool = btn("",6,150,158,Color3.fromRGB(45,110,145)); local bTr = btn("",170,150,76,Color3.fromRGB(145,70,70)) -- Arrastrar ícono fantasmita en móvil/PC y abrir HUD al hundir sin mover local activeInp, startPos, startFramePos, dragged = nil, Vector2.zero, Vector2.zero, false local function clampPos(x, y, w, h) local vp = cam() and cam().ViewportSize or Vector2.new(1280, 720) return math.clamp(x, 4, math.max(4, vp.X - w - 4)), math.clamp(y, 4, math.max(4, vp.Y - h - 4)) end trk(iconHit.InputBegan:Connect(function(i) if activeInp then return end if i.UserInputType == Enum.UserInputType.Touch or i.UserInputType == Enum.UserInputType.MouseButton1 then activeInp = i startPos = Vector2.new(i.Position.X, i.Position.Y) startFramePos = ghostIcon.AbsolutePosition dragged = false end end)) local function moveIconWithInput(i) if i ~= activeInp then return end if i.UserInputType == Enum.UserInputType.Touch or i.UserInputType == Enum.UserInputType.MouseMovement then local dx = i.Position.X - startPos.X local dy = i.Position.Y - startPos.Y if math.hypot(dx, dy) > 8 then dragged = true end local nx, ny = clampPos(startFramePos.X + dx, startFramePos.Y + dy, ghostIcon.AbsoluteSize.X, ghostIcon.AbsoluteSize.Y) ghostIcon.Position = UDim2.fromOffset(nx, ny) end end trk(iconHit.InputChanged:Connect(moveIconWithInput)) trk(UIS.InputChanged:Connect(moveIconWithInput)) local function finishIconInput(i) if i ~= activeInp then return end local wasDragged = dragged activeInp, dragged = nil, false if not wasDragged then local bx, by = clampPos(ghostIcon.AbsolutePosition.X - 90, ghostIcon.AbsolutePosition.Y, box.Size.X.Offset, box.Size.Y.Offset) ghostIcon.Visible = false box.Position = UDim2.fromOffset(bx, by) box.Visible = true end end trk(iconHit.InputEnded:Connect(finishIconInput)) trk(UIS.InputEnded:Connect(finishIconInput)) -- Arrastrar HUD principal local drag, d0, p0 = nil, Vector2.zero, Vector2.zero trk(top.InputBegan:Connect(function(i) if not drag and (i.UserInputType == Enum.UserInputType.Touch or i.UserInputType == Enum.UserInputType.MouseButton1) then drag, d0, p0 = i, Vector2.new(i.Position.X, i.Position.Y), box.AbsolutePosition end end)) trk(UIS.InputChanged:Connect(function(i) if i == drag and (i.UserInputType == Enum.UserInputType.Touch or i.UserInputType.MouseMovement) then local nx, ny = clampPos(p0.X + i.Position.X - d0.X, p0.Y + i.Position.Y - d0.Y, box.AbsoluteSize.X, box.AbsoluteSize.Y) box.Position = UDim2.fromOffset(nx, ny) end end)) trk(UIS.InputEnded:Connect(function(i) if i == drag then drag = nil end end)) local function sync() bAim.Text, bAim.BackgroundColor3 = "AIM:"..(CFG.Aim and "ON" or "OFF"), CFG.Aim and Color3.fromRGB(40,145,80) or Color3.fromRGB(120,45,45) bEn.Text, bEn.BackgroundColor3 = "ENEM:"..(CFG.Enem and "ON" or "OFF"), CFG.Enem and Color3.fromRGB(180,55,55) or Color3.fromRGB(70,75,88) bAl.Text, bAl.BackgroundColor3 = "ALIAD:"..(CFG.Aliad and "ON" or "OFF"), CFG.Aliad and Color3.fromRGB(45,145,85) or Color3.fromRGB(70,75,88) bWall.Text, bWall.BackgroundColor3 = "MURO:"..(CFG.Wall and "ON" or "OFF"), CFG.Wall and Color3.fromRGB(160,100,30) or Color3.fromRGB(65,70,85) bM.Text, bP.Text = "FOV - ("..CFG.FOV..")", "FOV +" bSmM.Text, bSmP.Text = string.format("SM - (%.2f)", CFG.Smooth), "SM +" bCad.Text, bPart.Text = "CAD:1/"..CFG.HitEvery, "OBJ:"..AIM_MODES[CFG.AimMode] bPrM.Text, bPrP.Text = string.format("PR-%.2f", CFG.Pred), "PR+" bXray.Text, bXray.BackgroundColor3 = "XRAY:"..(CFG.XRay and "ON" or "OFF"), CFG.XRay and Color3.fromRGB(130,60,145) or Color3.fromRGB(70,75,88) bStick.Text, bStick.BackgroundColor3 = "FIJAR:"..(CFG.Sticky and "ON" or "OFF"), CFG.Sticky and Color3.fromRGB(45,120,115) or Color3.fromRGB(70,75,88) bVeh.Text, bVeh.BackgroundColor3 = "AUTO:"..(CFG.AimInVehicle and "ON" or "OFF"), CFG.AimInVehicle and Color3.fromRGB(45,110,145) or Color3.fromRGB(70,75,88) bTool.Text, bTool.BackgroundColor3 = "SOLO CON ARMA:"..(CFG.NeedTool and "ON" or "OFF"), CFG.NeedTool and Color3.fromRGB(45,110,145) or Color3.fromRGB(70,75,88) bTr.Text, bTr.BackgroundColor3 = "LINEA:"..(CFG.Tracer and "ON" or "OFF"), CFG.Tracer and Color3.fromRGB(165,65,65) or Color3.fromRGB(70,75,88) fov.Visible, fov.Size = CFG.Aim, UDim2.fromOffset(CFG.FOV*2, CFG.FOV*2) if not CFG.Tracer then tracer.Visible = false end end mini.MouseButton1Click:Connect(function() local gx, gy = clampPos(box.AbsolutePosition.X + 90, box.AbsolutePosition.Y, ghostIcon.Size.X.Offset, ghostIcon.Size.Y.Offset) box.Visible = false ghostIcon.Position = UDim2.fromOffset(gx, gy) ghostIcon.Visible = true end) closeB.MouseButton1Click:Connect(function() pcall(function() RunService:UnbindFromRenderStep("000AimStep") end); for _, c in ipairs(conns) do pcall(function() c:Disconnect() end) end; for k in pairs(esp) do delESP(k) end; pcall(function() gui:Destroy() end) end) bAim.MouseButton1Click:Connect(function() CFG.Aim = not CFG.Aim; if not CFG.Aim then lockedPlr = nil end; sync() end) bEn.MouseButton1Click:Connect(function() CFG.Enem = not CFG.Enem; sync() end) bAl.MouseButton1Click:Connect(function() CFG.Aliad = not CFG.Aliad; sync() end) bWall.MouseButton1Click:Connect(function() CFG.Wall = not CFG.Wall; lockedPlr = nil; sync() end) bM.MouseButton1Click:Connect(function() CFG.FOV = math.max(50, CFG.FOV - 20); sync() end) bP.MouseButton1Click:Connect(function() CFG.FOV = math.min(400, CFG.FOV + 20); sync() end) bSmM.MouseButton1Click:Connect(function() CFG.Smooth = math.clamp(math.floor((CFG.Smooth - 0.08)*100 + 0.5)/100, 0.05, 1); sync() end) bSmP.MouseButton1Click:Connect(function() CFG.Smooth = math.clamp(math.floor((CFG.Smooth + 0.08)*100 + 0.5)/100, 0.05, 1); sync() end) bCad.MouseButton1Click:Connect(function() cadIdx = (cadIdx % #CAD_MODES) + 1; CFG.HitEvery = CAD_MODES[cadIdx]; sync() end) bPart.MouseButton1Click:Connect(function() CFG.AimMode = (CFG.AimMode % #AIM_MODES) + 1; sync() end) bPrM.MouseButton1Click:Connect(function() CFG.Pred = math.clamp(math.floor((CFG.Pred - 0.02)*100 + 0.5)/100, 0, 0.4); sync() end) bPrP.MouseButton1Click:Connect(function() CFG.Pred = math.clamp(math.floor((CFG.Pred + 0.02)*100 + 0.5)/100, 0, 0.4); sync() end) bXray.MouseButton1Click:Connect(function() CFG.XRay = not CFG.XRay; sync() end) bStick.MouseButton1Click:Connect(function() CFG.Sticky = not CFG.Sticky; if not CFG.Sticky then lockedPlr = nil end; sync() end) bVeh.MouseButton1Click:Connect(function() CFG.AimInVehicle = not CFG.AimInVehicle; lockedPlr = nil; sync() end) bTool.MouseButton1Click:Connect(function() CFG.NeedTool = not CFG.NeedTool; lockedPlr = nil; sync() end) bTr.MouseButton1Click:Connect(function() CFG.Tracer = not CFG.Tracer; sync() end) sync() local function tagESP(p, r, col, txt) local e = esp[p] if not e then local bb = Instance.new("BillboardGui"); bb.Adornee, bb.Size, bb.StudsOffset, bb.AlwaysOnTop, bb.Parent = r, UDim2.fromOffset(220,34), Vector3.new(0,2.8,0), true, gui local l = Instance.new("TextLabel"); l.Size, l.BackgroundTransparency, l.Font, l.TextSize, l.TextStrokeTransparency, l.TextWrapped, l.Parent = UDim2.fromScale(1,1), 1, Enum.Font.GothamBold, 11, 0.15, true, bb e = {bb = bb, l = l}; esp[p] = e end e.bb.Adornee, e.l.TextColor3, e.l.Text = r, col, txt; return e end local ignBuf, espList = {}, {} local function clearLOS(part, tChar, myHum, tHum) if not CFG.Wall then return true end local o = cam().CFrame.Position; table.clear(ignBuf) ignBuf[1], ignBuf[2], ignBuf[3] = cam(), LP.Character, tChar local myV, tV = seatMdl(myHum), seatMdl(tHum) if myV then ignBuf[#ignBuf + 1] = myV end; if tV then ignBuf[#ignBuf + 1] = tV end rayP.FilterDescendantsInstances = ignBuf local res = workspace:Raycast(o, part.Position - o, rayP) if not res then return true end local hit = res.Instance if hit:IsDescendantOf(tChar) or (tV and hit:IsDescendantOf(tV)) then return true end if hit:FindFirstAncestorWhichIsA("Accessory") and hit:IsDescendantOf(tChar) then return true end return false end local function pickPart(c, r, hd, myHum, tHum) if CFG.AimMode == 1 then return clearLOS(hd, c, myHum, tHum) and hd or nil end if CFG.AimMode == 2 then return clearLOS(r, c, myHum, tHum) and r or nil end if clearLOS(hd, c, myHum, tHum) then return hd end return (r ~= hd and clearLOS(r, c, myHum, tHum)) and r or nil end local function stepESP() local c0 = cam(); if not c0 then return end local myR = LP.Character and (LP.Character:FindFirstChild("HumanoidRootPart") or LP.Character.PrimaryPart) local orig = myR and myR.Position or c0.CFrame.Position; table.clear(espList) for _, p in ipairs(Players:GetPlayers()) do if p == LP then continue end local ch = p.Character; local hum = ch and ch:FindFirstChildOfClass("Humanoid"); local rt = ch and (ch:FindFirstChild("HumanoidRootPart") or ch.PrimaryPart) if not ch or not hum or not rt or hum.Health <= 0 then delESP(p); continue end local d = (rt.Position - orig).Magnitude; if d > CFG.Dist then delESP(p); continue end local _, fName, ally = metaOf(p); local _, inV = seatMdl(hum); local suf = inV and " [AUTO]" or "" if ally then if lockedPlr == p then lockedPlr = nil end if esp[p] and esp[p].hl then pcall(function() esp[p].hl:Destroy() end); esp[p].hl = nil end if CFG.Aliad then tagESP(p, rt, Color3.fromRGB(60,220,110), string.format("[%s] %s | %dHP | %dm%s", fName, p.Name, math.floor(hum.Health), math.floor(d), suf)) elseif esp[p] and esp[p].bb then pcall(function() esp[p].bb:Destroy() end); esp[p].bb = nil end elseif CFG.Enem then espList[#espList + 1] = {p = p, ch = ch, hum = hum, rt = rt, d = d, fName = fName, suf = suf} else delESP(p) end end if not CFG.Enem then return end table.sort(espList, function(a, b) return a.d < b.d end) for i, it in ipairs(espList) do local col = Color3.fromRGB(255,55,55) local e = tagESP(it.p, it.rt, col, string.format("[%s] %s | %dHP | %dm%s", it.fName, it.p.Name, math.floor(it.hum.Health), math.floor(it.d), it.suf)) if CFG.XRay and i <= CFG.MaxHL then if not e.hl then local hl = Instance.new("Highlight"); hl.DepthMode, hl.FillTransparency, hl.Parent = Enum.HighlightDepthMode.AlwaysOnTop, 0.65, gui; e.hl = hl end e.hl.FillColor, e.hl.OutlineColor, e.hl.Adornee = col, col, it.ch elseif e.hl then pcall(function() e.hl:Destroy() end); e.hl = nil end end end local function validSticky(p, cx, cy, holdSq, camPos, c0, myHum) if not p or not p.Parent or isAlly(p) then lockedPlr = nil; return nil end local ch, hum, r, hd = targetOf(p); if not ch or not hd then lockedPlr = nil; return nil end local ap = pickPart(ch, r, hd, myHum, hum); if not ap or (ap.Position - camPos).Magnitude > CFG.Dist then lockedPlr = nil; return nil end local sp, vis = c0:WorldToViewportPoint(ap.Position); if not vis or sp.Z <= 0 or ((sp.X - cx)^2 + (sp.Y - cy)^2) > holdSq then lockedPlr = nil; return nil end return ap, r end local acc, cadTick, gT = 0, 0, 0 pcall(function() RunService:UnbindFromRenderStep("000AimStep") end) RunService:BindToRenderStep("000AimStep", Enum.RenderPriority.Camera.Value + 1, function(dt) local c0 = cam(); if not c0 then return end acc += dt; gT += dt if box.Visible and ghost.Visible then ghost.Position = UDim2.new(0.5, -58, 0.5, -50 + math.sin(gT * 2.4) * 3) end if acc >= CFG.Rate then acc = 0; pcall(stepESP) end local plrs = Players:GetPlayers() local locked, lPos, enCount = nil, nil, 0 for _, p in ipairs(plrs) do if p ~= LP and not isAlly(p) and targetOf(p) then enCount += 1 end end local vp = c0.ViewportSize; local cx, cy = vp.X * 0.5, vp.Y * 0.5 local ready, stTxt, myHum = canAim(c0) if ready then local fovSq, holdSq, camPos = CFG.FOV * CFG.FOV, (CFG.FOV * 1.55)^2, c0.CFrame.Position local bPart, bRoot, bP = nil, nil, nil local bestS = math.huge for _, p in ipairs(plrs) do if p == LP or isAlly(p) then continue end local ch, hum, r, hd = targetOf(p); if not ch or not hd then continue end local ap = pickPart(ch, r, hd, myHum, hum); if not ap then continue end local d = (ap.Position - camPos).Magnitude; if d > CFG.Dist then continue end local sp, vis = c0:WorldToViewportPoint(ap.Position); if not vis or sp.Z <= 0 then continue end local dSq = (sp.X - cx)^2 + (sp.Y - cy)^2; if dSq > fovSq then continue end local sc = d * 1.4 + math.sqrt(dSq) * 0.35 if sc < bestS then bestS, bPart, bRoot, bP = sc, ap, r, p end end if CFG.Sticky and lockedPlr and lockedPlr ~= bP then local spP, spR = validSticky(lockedPlr, cx, cy, holdSq, camPos, c0, myHum) if spP then local sDist = (spP.Position - camPos).Magnitude local bDist = bPart and (bPart.Position - camPos).Magnitude or math.huge if sDist <= bDist + 12 then bPart, bRoot, bP = spP, spR, lockedPlr else lockedPlr = bP end else lockedPlr = bP end elseif CFG.Sticky then lockedPlr = bP else lockedPlr = nil end if bPart and bP and not isAlly(bP) and targetOf(bP) then locked, lPos = bP.Name, bPart.Position; cadTick += 1 local ev = math.max(1, math.floor(tonumber(CFG.HitEvery) or 1)) if ev == 1 or (cadTick % ev) == 0 then local vel = (bRoot and bRoot.AssemblyLinearVelocity) or Vector3.zero local aimPos = bPart.Position + vel * (CFG.Pred * math.clamp((bPart.Position - camPos).Magnitude / 250, 0.25, 1.8)) local dir = aimPos - camPos if dir.Magnitude > 0.5 and math.abs(dir.Unit.Y) < 0.98 then local cur, goal = c0.CFrame, CFrame.lookAt(camPos, aimPos) local alpha = 1 - math.pow(1 - math.clamp(CFG.Smooth, 0.05, 0.99), math.clamp(dt * 60, 0.25, 3)) c0.CFrame = (CFG.Smooth >= 0.98 or cur.LookVector:Angle(goal.LookVector) < 0.0022) and goal or cur:Lerp(goal, alpha) end end else lockedPlr = nil end else lockedPlr = nil end if CFG.Tracer and lPos then local sp, vis = c0:WorldToViewportPoint(lPos) if vis and sp.Z > 0 then local dx, dy = sp.X - cx, sp.Y - cy tracer.Position, tracer.Size, tracer.Rotation, tracer.Visible = UDim2.fromOffset((cx + sp.X)*0.5, (cy + sp.Y)*0.5), UDim2.fromOffset(math.sqrt(dx*dx + dy*dy), 1.5), math.deg(math.atan2(dy, dx)), true else tracer.Visible = false end else tracer.Visible = false end fStroke.Color = locked and Color3.fromRGB(255,65,65) or (ready and wCol or Color3.fromRGB(130,135,150)) info.Text = "En:"..enCount.." | "..(locked or stTxt) end)