Getting started
You need Node.js 20 or newer and the path to the game’s
Modules folder. Nothing has to be installed globally.
-
Create and install a project
Terminal window npx killscript@0.1.2 new MyModule --modules "/path/to/KILLSCRIPT/Modules"This creates a regular client module, installs its dependencies, builds it and writes the game-readable folder to
Modules/MyModule. Add--reflexonly when you also need server-side logic:Terminal window npx killscript@0.1.2 new MyModule --reflex --modules "/path/to/KILLSCRIPT/Modules"The version is pinned intentionally: a future generator release cannot silently change a project created from this guide. Upgrade it deliberately after reading that release’s notes.
You can omit
--moduleswhen the game is on another machine or the share is not mounted yet. Connect it later with:Terminal window cd MyModulenpm run install:game -- --modules "/path/to/KILLSCRIPT/Modules" -
Start hot reload
Terminal window cd MyModulenpm run devThe machine-specific path is saved in
.killscript/local.jsonand ignored by Git. Every successful save now updates the generated module folder; a failed build leaves the previous working version in place.Client and Reflex code are reloaded from the folder automatically. A real
scripts/server.luaupdate prints a notice and requests a server reload for the current match. Do not cycle the module just to apply server code: in some game builds that restarts only the client side. -
Enable the folder module
Open or reopen the in-game module list and enable
MyModuleonce. The game scans direct children ofModules, not TypeScript project folders. The generated folder keeps the same module ID, so later builds replace it in place. If an already open list does not refresh, restart the game once. -
Make a visible change
The starter binds F6. Press it in game to toggle the starter feature and display a hint. Edit
src/client/features/module-toggle.ts, save, and try it again—there is no.KillScriptimport step during development. -
Build a release
Terminal window npm run buildThe distributable file is written to
dist/MyModule.KillScript.
If the game does not update
Section titled “If the game does not update”Run:
npm run doctorIt checks the project configuration, every configured compiler context and the saved game connection. See Troubleshooting for console filters, SMB locks and folder ownership errors.
Continue from here
Section titled “Continue from here”- Project structure explains where new features, shared types and Reflex code belong.
- How the SDK works maps every helper to its client or server context.
- Game API and types connects the toolchain to the complete native KILLSCRIPT reference.