Lua

Lua scripting

Lua scripts run inside the Adolfjon program. They draw on the overlay, read the match, react to kills and rounds, add lines to the ESP, build HUD panels and their own menu pages. You build your own features on top of our engine, and every script stays inside a sandbox you control.

Lua 5.4standard language, sandboxed
179functions in 39 namespaces
28game events
53copy-paste examples

Hello, world

Save this as hello.lua in the scripts folder (or copy it and press From Clipboard on the Lua page), then turn it on.

hello.lua
-- name: Hello
-- author: you
-- version: 1.0
-- description: My first script.

ui.color("col", "Text colour", color(255, 255, 255))

function on_frame()
    local w, h = draw.screen()
    draw.text(20, h / 2, "Hello from Lua", ui.get("col"), 18)
end

What scripts can do

Under your control

A script can only do what the API gives it, and the risky parts need a permission the user ticks by hand on the script's page.

PermissionWhat it allows
settingsLets the script change the real program settings: config.set, aim.enabled(on), trigger.enabled(on), players.flag(id, flag) and players.color(id, c).
chatLets the script send chat messages with chat.say and chat.team.
networkLets the script call http.get. Only https://adolfjon.uz/ addresses are allowed.
  • Game memory is read-only. Scripts cannot write memory, send input or call into the game.
  • No files outside the script's own folder, no programs, no websites other than adolfjon.uz.
  • A script that hangs is stopped after 8 ms, so your FPS holds.

Read Sandbox and limits for the full list.

Where to go next