local frag = getgenv().fragESP local lib = getgenv().Library local holder = frag.holder local cam = workspace.CurrentCamera local Vp = cam.ViewportSize -- independent expectation: who should draw, by footprint intersection with the screen local expect = {} local shown = {} for _, p in ipairs(game:GetService("Players"):GetChildren()) do if p ~= game:GetService("Players").LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") and p.Character:FindFirstChild("Humanoid") and p.Character.Humanoid.Health > 0 then local cf, sz = p.Character:GetBoundingBox() local hp = cam:WorldToScreenPoint(cf.Position + Vector3.yAxis * (sz.Y / 2)) local fp = cam:WorldToScreenPoint(cf.Position - Vector3.yAxis * (sz.Y / 2)) local wp = cam:WorldToScreenPoint(cf.Position + cam.CFrame.RightVector * (math.max(sz.X, sz.Z) * 0.5)) local d = (cf.Position - cam.CFrame.Position).Magnitude if hp.Z > 0.1 and fp.Z > 0.1 and wp.Z > 0.1 and d <= frag.config.maxdist then local cx = (hp.X + fp.X) / 2 local hw = math.max(math.abs(wp.X - cx) + 1.5, 3) local top = math.min(hp.Y, fp.Y) - 1 local bh = math.max(math.abs(fp.Y - hp.Y) - 1, 21) local l, r, b = cx - hw, cx + hw, top + bh local M = 150 if r > -M and l < Vp.X + M and b > -M and top < Vp.Y + M then expect[p.Name] = string.format("d=%d rect=%.0f,%.0f..%.0f,%.0f", math.floor(d), l, top, r, b) end end end end task.wait(0.4) for _, v in ipairs(holder:GetChildren()) do if v.Name == "LeftTop" and v.Visible then shown[v:GetAttribute("fragPlayer")] = true end end local missing, extra = {}, {} for name in pairs(expect) do if not shown[name] then table.insert(missing, name .. "[" .. expect[name] .. "]") end end for name in pairs(shown) do if not expect[name] then table.insert(extra, name) end end local ne = 0 for _ in pairs(expect) do ne += 1 end local ns = 0 for _ in pairs(shown) do ns += 1 end print("expected:", ne, "| drawn:", ns) print("missing:", #missing, table.concat(missing, " | ")) print("extra:", #extra, table.concat(extra, " | "))