starlit

Lua scripting

Scripts are plain Lua 5.4 files. They read the match, draw on the screen and in the world, tune the ragebot, movement, world and ESP, and add controls, pages and tabs to the menu.

This documentation is for people who write scripts for Starlit. It describes what exists in the current build and nothing else. Start with Getting started if you have not loaded a script yet.

Guide

pagewhat it covers
Getting startedWhere the scripts folder is, how a script is loaded and confirmed, where its controls show up in the menu, and a first script written one step at a time.
How scripts runOne Lua state for every script, the order of a frame, how requests from the scripts page and tuning calls are timed, the time and memory budgets, and what happens when a script goes over them.
Limits, files and saved valuesEvery number a script can run into: files, memory, time, drawing, the menu, the tuning modules, what a call costs, the rules for file names, and how a script's control values are saved.
What scripts can doA map of what a script can do in Starlit: improve the ragebot, tune movement and the world, restyle and build visuals, and add features, pages and whole tabs to the menu.

Reference

pagewhat it covers
gameA read-only copy of the match for this frame: all players, the local player, and the projection of a world point onto the screen.
entityHandles for players, the methods that read them, and the properties that ent:get can return.
eventsHow to register callbacks, when each one runs, and the exact fields of every game event.
drawText, lines, rectangles, circles, gradients, polygons and clipping on the screen, shapes and hitbox outlines in the world, with the six fonts, the three text styles and both ways to pass a colour.
uiControls for your script on the scripts page and on the pages of the menu: checkboxes, sliders, combos, colours, keybinds, text, values, folds, inputs, lists, groups and their layout, and how the values are kept.
menu tabs, style and surfacesAdd a tab of your own to the menu, give the whole menu a look, and keep live drawing panels in a tab, on a page or floating on the screen.
rageTune the ragebot while you play: hit chance, minimum damage, the fire gate, which enemies it aims at, double precision and the stops.
resolver and events.on_shotGive the ragebot a yaw hint for an enemy, and read the result of every shot fired with it.
settingsRead Starlit's movement, ESP, chams, glow, world and cosmetic settings, and change them for a moment: animated fog, an ESP element that follows a condition, a movement helper on a key of your own.
settings idsThe 548 setting ids of the settings module, by area, with the kind, the range and the menu row each one belongs to.
movementBuild your own movement features on a virtual keyboard: a stick with a direction, plus jump, duck and walk, applied where the player's own keys are.
visualsRestyle Starlit's own player ESP one player at a time: hide or recolour parts, add text lines and bars, and change the colour and material of chams and the colour of glow.
time, cvar, screen and logThe script log, three clocks, the screen size, and the 29 server values that cvar.get can read.
vec3, color, bit and mathThe helper types and functions we write in Lua for you, the extra math functions, and the list of standard Lua names that remain.

More

pagewhat it covers
ExamplesComplete scripts: an enemy overlay, hit markers with a kill feed, a small resolver, and five scripts that combine the rage, settings, movement, visuals, 3D drawing and menu modules.
For developersHow to report a bug, how to ask for a function, how a new function is built, how to detect functions from a script, and what is planned.
ChangelogWhat each release of the script API added, newest first.