Example scripts
Each example is a single complete .lua file. Download it, install it on the Scripts page, switch it on, and open its tab to change its settings. Every one of them is run through the real script host in the overlay's test suite with a fake game, and must start without errors, warnings or budget strikes, build its tab and draw its widget. They have not been tried in a real match: see the gaps page.
| Example | What it shows | Permissions |
|---|---|---|
| Custom watermark | draw event, text measuring, anchoring to a corner, a settings tab, fading | none |
| Session timer | A draggable widget, timers, the ingame event, saving a total, buttons | none |
| Status widget | A configurable widget, snapshot data, settings event, ui.widget_visible | none |
| No flash | Writing game memory the safe way: permissions, the master switch, undo | memory, memory_write |
How to install one#
- Download the
.luafile with the Download button. The file name becomes the script's id. - Open the overlay menu, go to Scripts, paste the full path of the file into the install box and press Install.
- Select the script, grant the permissions it lists (most need none), and switch Enabled on.
- Open the script's own tab on the Scripts page to change its settings; they are saved automatically.
A first, smaller script is on your first script.
Reading them#
The scripts are written to be read. Each starts with header lines, creates its interface once at load, keeps state in local variables, reads settings through store.get, and does as little as possible per frame. The pages walk through the parts that are worth understanding.