Elysium scripting API index
Elysium scripting

Script the cheat.

Draw overlays, react to what happens in the game, build your own menus, read players and the world, and edit the command that is sent every tick. Plain Lua 5.4, loaded from a folder and reloaded with one click.

scripts/hello.lua
local group   = ui.group( "hello" )
local enabled = group:toggle( "enabled", true )
local white   = color( 255, 255, 255 )

on( "frame", function( canvas )
	if enabled:get( ) then
		canvas:text( 20, 20, "hello", white )
	end
end )

#What you can do

#A script in thirty seconds

A script is one .lua file in C:\elysium\scripts. It runs top to bottom when it loads, and from then on it only does what its handlers do:

scripts/ping.lua
-- runs once, when the script loads
print( "loaded" )

-- runs every rendered frame
on( "frame", function( canvas )
	canvas:text( 20, 20, string.format( "%d fps", math.floor( render.fps( ) + 0.5 ) ), color( 255, 255, 255 ) )
end )

-- runs when someone is hurt
on( "game:player_hurt", function( ev )
	ui.notify( "someone got hurt" )
end )

-- runs when the script is switched off or reloaded
on( "unload", function( )
	print( "bye" )
end )

on( name, handler ) is the one function that connects a script to the cheat. The events page lists every name it takes.

#The modules

ModuleWhat it is forPage
on, off, after, every, next_frameEvents and timersEvents & timers
render, the canvasFonts, textures, shapes, text, shadersDrawing, Shaders
uiGroups, windows, every kind of control, toastsMenus & controls
ents and entity objectsPlayers, weapons, projectiles, the bomb, schema fieldsPlayers & entities
worldTraces, visibility, bullet penetration, damageTraces & damage
cmd, btnThe command of the current tickEditing the command
viewThe camera, world-to-screen projectionCamera & projection
cheat, espThe cheat's settings and state, the player overlayCheat integration
gameMap, time, console, sound, chat, particles, convarsGame, console & sound
inputKeys, mouse, the cheat's hotkeysInput
fs, store, json, base64, hash, net, memFiles, saved state, encodings, network, memoryFiles, data & network
vec3, vec2, color, mathValue types and helpersMath

#Conventions in this guide

You seeIt means
[, rounding]An optional argument. Leave it out and the default applies.
a:method()A method: call it with a colon on the object, not a dot.
module.function()A plain function in a module: call it with a dot.
trustedOnly available to scripts you switched to trusted. See Sandboxed and trusted.
game threadHas to run on the game's own thread. Called from elsewhere it is queued or refused - the entry says which.
eventAn event name for on().

Distances are in game units, angles in degrees, screen positions in pixels from the top left corner, time in seconds unless a name says ms or ticks. Lists are 1-based, like everywhere in Lua - except the ones that are indexed by a game number such as a bone id, and the entry says so.

#Where to go next

Elysium scripting guide · built 2026-10-03