HUD
Panels that look like the built-in widgets, drag with the menu open and remember their spot.
Each snippet runs as-is: copy it, press From Clipboard on the Lua page, turn it on. Quick start
#A basic panel
Call it every frame. Draw from the returned corner.
function on_frame()
local x, y, shown = hud.panel("info", "Info", 180, 30)
if not shown then return end
draw.text(x + 10, y + 7, "Map: " .. globals.map(), color(235, 238, 245), 14)
end#Panel that grows with its rows
The height can change every frame.
function on_frame()
local list = game.players()
local x, y, shown = hud.panel("alive", "Alive", 180, #list * 18 + 8)
if not shown then return end
for i, p in ipairs(list) do
draw.text(x + 10, y + 4 + (i - 1) * 18, p.name .. " " .. p.health, color(235, 238, 245), 13)
end
end#Show only in a match or with the menu open
So the user can still place the panel from the main menu.
function on_frame()
if not globals.in_match() and not globals.menu_open() then return end
local x, y, shown = hud.panel("clock", "Round", 120, 30)
if shown then draw.text(x + 10, y + 7, string.format("%.0f s", game.time()), color(240, 242, 246), 14) end
endFull scripts
Complete scripts with a header and settings, ready to use or change.
Kill feed
A HUD panel that lists your last kills with weapon and headshot icons.
Spectator list
A HUD panel with everyone watching you, and a notification when someone joins.
Team score bar
T and CT score on top of the screen, with the round number and a round timer.
Bomb timer
A bar that drains as the bomb counts down, turns red when there is no time to defuse.
Velocity and keystrokes
Speed under the crosshair with last-jump takeoff, and WASD boxes that light up.