Examples
Complete mods to read, run and start from.
Each example is a complete project in the
examples directory
of the repository. Clone the repository, change into an example's directory and
run modlock dev to play it.
| Example | Shows |
|---|---|
hello-ts | Commands, a JSX menu with buttons, moving text, a setting, metrics. |
arena | A free-for-all: ready-up, countdown, kills, bots, a self-test. |
hill | King of the hill: a ring of world text, team scores, progress bars. |
drill | An aim drill: target bots, headshots, a length setting, best score. |
dropper | Players place solid objects from a catalog with /build and share the spot they make. |
world-panel | A board of the mod's own layout, drawn in the world. |
inventory | A drag inventory in the mod's own layout, script and style sheet. |
bounty | A Luau free-for-all: a bounty marker, damage hooks, flares, bots. |
race | A Go checkpoint race: a marked course, laps, resets, unit tests. |
hello-luau | The smallest mod in Luau. |
hello-python | The smallest mod in Python. |
hello-go | The smallest mod in Go. |
puppet | A ghost bot that replays a walk you can pause, seek and speed up. |
charge-limit | A self-test that raises an ability's charges on one bot. |
cooldown | A self-test that gives one bot's abilities a cooldown of its own, and checks the cast and kill events. |
street-brawl | A self-test of zipline rides, the zipline boost and imbued items. |
hello | A native plugin in C++, built with CMake instead of modlock dev. |
The same small mod, written once in each language, shows how the libraries compare:
| Example | Shows |
|---|---|
hero-build-ts, hero-build-luau, hero-build-python, hero-build-go | Reading a hero's recommended build from the game's data. |