Documentation
Choose a section based on what you want to build. If you need to look up a signature or property access mode, start with the API reference.
Getting started
Section titled “Getting started”Module overviewRegular and Reflex modules, folder projects, .KillScript packages, and the recommended learning path.
Your first moduleCreate a module in the game, enter a map, use the console, write Lua, and confirm hot reload.
Your first Reflex moduleTwo entry points, client/server contexts, and a first table exchange through Network.
Module structuremodule.json, entry points, settings, input, assets, tags, and size limits.
Development and debuggingA fast editing loop, console filters, automatic reload, and common errors.
Imports and packagesHow .KillScript differs from a folder, how to import it, and how Fork creates an editable copy.
Vibe coding
Section titled “Vibe coding”Vibe coding basicsWhat to delegate to an AI and which rules lead to reliable modules.
Context for AIllms.txt, a ready starter prompt, and a precise task template.
Working loopSmall iterations, in-game testing, and useful error reports.
Module development
Section titled “Module development”Editor and APIOpen the project, use ModuleAPI, and restore completion.
Organizing Lua codeLocal state, functions, nil checks, hot reload, and client/server separation.
Settings, input, and dataChoose between Config, InputActions, and Storage.
Assets and localizationImages, audio, UXML/USS, translations, and release preparation.
Interface guides
Section titled “Interface guides”Choosing a UI APIWhen to use ImGui, UXML, or WorldVisuals.
ImGui HUDAn adaptive information block using local-player health.
Your first UXML interfaceA persistent panel, USS styles, and Lua updates.
Events, styles, and animationsAn interactive window, input capture, and a smooth entrance.
Reflex modules
Section titled “Reflex modules”Reflex architectureClient/server boundary, lifecycle, and responsibilities.
Network protocolMessage types, synchronization, and input validation.
Server loopOnTick, intervals, CPU budget, and safe object access.
Complete Reflex moduleA ready low-health warning with client and server code.
Practical recipes
Section titled “Practical recipes”Toggle actioninputs.json, OnPerformed, and a controlled HUD.
Persistent stateVersioned interface data through Storage.
Ally labelsWorld projection and screen-space labels.
Camera previewA custom camera and live OutputTexture.
Custom servers
Section titled “Custom servers”Create a serverInvite players, connect configuration, and test modules.
Server commandsMaps, rounds, agents, items, and player management.
API reference
Section titled “API reference”Reference pages describe both signatures and processing paths. Distinguish between:
- a value (
Vector3,Color), which only carries data until another API consumes it; - a query/result (
Raycast,GetAll, event structures), which observes or describes an already calculated result; - a live object (
Agent,Item,Entity), which refers to an existing game object and may become unavailable; - a config object (
ConfigItem*), which describes rules for an object type but is not a live item; - a command, which submits a change to a particular subsystem; a
nilreturn does not always mean the server accepted the outcome.
At the beginning of each page, check which system owns the data, where the call runs, and which consumer presents its result.
Core types
Section titled “Core types”ArrayAPI arrays, one-based indexing, Length, iteration, and differences from regular Lua tables.
ColorRGBA color components, constructors, writable values, and the absence of automatic clamping.
RectPosition, size, boundaries, and center of rectangular regions.
Vector2Two-dimensional points and directions, length, normalization, distance, and angles.
Vector3World positions and directions, ready-made axes, vector operations, yaw, and pitch.
QuaternionThree-dimensional rotations, Euler angles, interpolation, operators, and important limitations.
Runtime
Section titled “Runtime”TimeSimulation time and ticks, unit conversions, numeric precision, and safe rounding.
SchedulerPer-frame and server-tick callbacks, subscription cancellation, and delayed calls.
Data and input
Section titled “Data and input”InputActionCustom buttons from inputs.json, built-in action lookup, OnPerformed, IsPressed, and the Disable limitation.
ConfigThe config.json format, setting types, enums, bit masks, normalization, and Reflex server behavior.
StoragePersistent local module data, supported values, key deletion, and the save lifecycle.
Localizationlocalization.csv, current-language strings, English fallback, and built-in game translations.
Environment
Section titled “Environment”CpuLimitModule CPU budget, remaining cycles, and differences between client and Reflex server.
MapInfoMap name and dimensions, minimap parameters, and gameplay zones at a world position.
NetworkInfoPing, RTT, traffic rates, interpolation, and packet loss.
PerformanceAverage FPS, frame time, and CPU/GPU utilization metrics.
ScreenCurrent game screen dimensions and screen-region calculations.
Graphics
Section titled “Graphics”CameraMain and custom cameras, OutputTexture, world-space projection, and a complete preview example.
TextureLoad PNG, JPG, and JPEG assets from a module, inspect texture dimensions, and draw an image.
Game world
Section titled “Game world”AgentMatch players, aim, health, movement, inventory, input, and damage events.
ItemItems and subtypes, hitscan, throwable trajectories, Drops, and safe pickup.
EntityShared entity properties, thrown projectiles, active explosions, and subtypes.
GameConfigGlobal constants, flags, and exact item, firearm, and throwable configuration.
ShopPurchasing, selling, limits, and checking the actual result of a shop operation.
Match and networking
Section titled “Match and networking”NetworkExchange tables between a Reflex client and server, with supported values and message patterns.
DefusalGameMatch and round state, timers, BridgeCharge, game sides, and round history.
TeamTeam score, economy-loss streak, and used timeouts.
PhysicsClient raycasts, distance limits, hits, misses, and the RaycastHit structure.
CombatLogDamage dealt and received, with accurate read-only entry properties.
Presentation and communication
Section titled “Presentation and communication”AudioSound loading and local playback, voice-chat state, and the voice-line player.
WorldVisualsLines, patterns, and projected areas in the three-dimensional game world.
NotificationLocal hints, notifications, ping markers, and ping events.
ChatChat channels, local and network messages, switching, and events.
Interface
Section titled “Interface”ImGuiFast immediate-mode UI for text, textures, and configurable HUD windows.
UXMLPersistent UXML panels and windows, cursor and input control, and lifecycle management.
ElementsVisualElement, text, images, input fields, scrolling, and pointer events.
StylesDimensions, position, colors, backgrounds, and transforms through ElementStyle.
AnimationsScheduleAnimation and Tweener for smooth transitions, stopping, and completion.
Experimental tools
Section titled “Experimental tools”Developing with TypeScriptA third-party community compiler, type declarations, and SDK for advanced module development.