local ESP = {} local camera = workspace.CurrentCamera local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local WorldToViewportPoint = camera.WorldToViewportPoint local function Create2DESP(model) if not model or not model.Parent then return end if ESP[model] then return end local drawings = { box = Drawing.new("Square") } local box = drawings.box box.Thickness = 1 box.Color = Color3.fromRGB(255, 255, 255) box.Transparency = 1 box.Filled = false box.Visible = false ESP[model] = drawings end local updateConnection = RunService.PreRender:Connect(function() for model, drawings in pairs(ESP) do local rootPart = model:FindFirstChild("humanoid_root_part") if not rootPart then drawings.box.Visible = false continue end local rootCFrame = rootPart.CFrame local rootPos = rootCFrame.Position local upVectorY = rootCFrame.UpVector.Y local screenPos, onScreen = WorldToViewportPoint(camera, rootPos) if onScreen then local offset = Vector3.new(0, 3 * math.abs(upVectorY), 0) local topPos = WorldToViewportPoint(camera, rootPos + offset) local bottomPos = WorldToViewportPoint(camera, rootPos - offset) local height = math.abs(topPos.Y - bottomPos.Y) local width = height * 0.6 drawings.box.Size = Vector2.new(width, height) drawings.box.Position = Vector2.new(screenPos.X - width/2, screenPos.Y - height/2) drawings.box.Visible = true else drawings.box.Visible = false end end end) local characters = workspace:WaitForChild("characters") if characters then for _, model in ipairs(characters:GetChildren()) do task.spawn(function() Create2DESP(model) end) end characterAddedConnection = characters.ChildAdded:Connect(function(model) task.wait(0.5) task.spawn(function() Create2DESP(model) end) end) characterRemovedConnection = characters.ChildRemoved:Connect(function(model) if ESP[model] then ESP[model].box:Remove() ESP[model] = nil end end) end local function CleanupESP() for _, drawings in pairs(ESP) do drawings.box:Remove() end ESP = {} if updateConnection then updateConnection:Disconnect() end if characterAddedConnection then characterAddedConnection:Disconnect() end if characterRemovedConnection then characterRemovedConnection:Disconnect() end end game:GetService("UserInputService").InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.RightControl then CleanupESP() end end)