Developer knowledge network ยท moderated exchange

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Knowledge indexLive
4Categories
919Threads
2.8KPosts
Release

Drawing ESP boxes and distance tags in Roblox CoreGui with Drawing API

imgui_artisan
UI Designer
MEMBER
Rep: 202
Join Date: Apr 2019
Posts: 54
Thanks: 28
1 months ago ยท Jul 14, 2026 7:38 AM
#1

Clean implementation of player ESP using the custom Drawing library:

LUA
local function CreateESP(player)
    local box = Drawing.new('Square')
    box.Thickness = 1.5
    box.Filled = false
    box.Color = Color3.fromRGB(0, 255, 128)
    
    local nameTag = Drawing.new('Text')
    nameTag.Size = 14
    nameTag.Center = true
    nameTag.Outline = true
    nameTag.Color = Color3.fromRGB(255, 255, 255)
    
    game:GetService('RunService').RenderStepped:Connect(function()
        if player.Character and player.Character:FindFirstChild('HumanoidRootPart') then
            local root = player.Character.HumanoidRootPart
            local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(root.Position)
            if onScreen then
                box.Visible = true
                box.Position = Vector2.new(screenPos.X - 25, screenPos.Y - 35)
                box.Size = Vector2.new(50, 70)
                
                nameTag.Visible = true
                nameTag.Position = Vector2.new(screenPos.X, screenPos.Y - 52)
                nameTag.Text = player.Name .. ' [' .. math.floor(screenPos.Z) .. 'm]'
            else
                box.Visible = false
                nameTag.Visible = false
            end
        end
    end)
end
luau_hacker
Luau Expert
MEMBER
Rep: 159
Join Date: Aug 2020
Posts: 17
Thanks: 26
1 months ago ยท Jul 14, 2026 12:30 PM
#2

Drawing.new() renders with hardware GPU acceleration in CoreGui. Zero frame drop.

segfault_sam
Member
MEMBER
Rep: 68
Join Date: Mar 2019
Posts: 22
Thanks: 57
1 months ago ยท Jul 14, 2026 4:06 PM
#3

Simple, clean, and works across all games.