Reference
Scripting API
Every class, property, callback, and command — fully documented.
v1.0Exported: 2026-05-26 01:01
Block
▼Base class for all placeable blocks in the world. Handles health tracking
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| maxHealth | number | 50 | Maximum health this block starts with. Set on subclasses. |
| blastResistance | number | 50 | Blast resistance — energy drained from an explosion per block. |
| maxStress | number | 50 | Maximum structural stress this block can bear before collapsing. |
| health | any | self.maxHealth or 50 | |
| health | any | (self.health or 0) - amount |
Methods & Callbacks
onCreate()
Called server-side when this block is placed in the world.
onDamage(amount, source)
Called server-side when this block receives damage.
- amount number — Damage amount to apply.
- source any — The entity or tool that caused the damage.
onDestroy(source)
Called server-side when this block's health reaches zero.
- source any — The entity or tool that delivered the killing blow.
Effect
▼Base class for all status effects (burning, bleeding, poisoned, etc.).
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| tickInterval | number | nil | How often (in seconds) onTick fires. Leave nil to disable tick timers. |
| duration | number | 5 | Duration of this effect in seconds. Used by the effect manager to schedule expiration. |
Methods & Callbacks
onApply(target)
Called server-side when this effect is applied to an entity.
- target PlayerState — The player or entity the effect is applied to.
onTick(target)
Called server-side on each tick interval while the effect is active.
- target PlayerState — The player or entity currently affected.
onExpire(target)
Called server-side when this effect expires or is removed.
- target PlayerState — The player or entity the effect is expiring on.
Item
▼Base class for all items in the game. Every weapon, tool, consumable,
Methods & Callbacks
onCreate()
Called server-side when this item instance is first created.
onDestroy()
Called server-side when this item instance is destroyed or removed from the world.
onUse(player)
Called server-side when a player uses this item from their inventory.
- player PlayerState — The player who used the item.
onPlayerHit(attacker, target)
Called server-side when this item is used to hit another player.
- attacker PlayerState — The player performing the hit.
- target PlayerState — The player or entity being hit.
Tool extends Item
▼Base class for all tools. Extends Item with durability tracking and
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| maxDurability | number | 100 | Maximum durability this tool starts with. Set on subclasses. |
| durability | any | self.maxDurability or 100 | |
| durability | any | (self.durability or 0) - amount |
Methods & Callbacks
onCreate()
Called server-side when this tool is first created.
onPlayerHit(attacker, target)
Called server-side when this tool is used to hit another player.
- attacker PlayerState — The player performing the hit.
- target PlayerState — The player or entity being hit.
wearDown(amount)
Reduces durability by the given amount.
- amount number — Amount to subtract from current durability.
onBreak()
Called server-side when the tool's durability reaches zero.
Weapon extends Item
▼Base class for all weapons. Extends Item with damage application on hit.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| baseDamage | number | 10 | Base damage dealt per hit. Overridden by each weapon definition. |
| damage | any | self.baseDamage or 10 |
Methods & Callbacks
onCreate()
Called server-side when this weapon is first created.
onPlayerHit(attacker, target)
Called server-side when this weapon connects with another player or entity.
- attacker PlayerState — The player swinging or firing the weapon.
- target PlayerState — The player or entity being hit.
Zombie
▼Base class for all zombie types. Handles health, spawning, death, and
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| maxHealth | number | 100 | Maximum health this zombie spawns with. Set on subclasses. |
| speed | number | 3 | Walk speed in metres per second. |
| attackDamage | number | 5 | Damage dealt per attack. |
| attackRange | number | 1.5 | Melee attack range in metres. |
| animController | string | "" | Reference to the RuntimeAnimatorController asset path. |
| lootTable | string | "zombie_loot_basic" | Loot table id used when this zombie dies. |
| CanSmash | boolean | false | Whether this zombie can smash through structural blocks. |
| CanCrawl | boolean | false | Whether this zombie can crawl under low obstacles. |
| Irradiated | boolean | false | Whether this zombie is irradiated (applies radiation damage on hit). |
| unlockThreshold | number | 0 | Minimum BossesKilled count required to unlock this zombie type. |
| health | any | self.maxHealth or 100 |
Methods & Callbacks
onCreate()
Called server-side when this zombie is spawned into the world.
onDeath()
Called server-side when this zombie's health reaches zero.
onAttack(target)
Called server-side when this zombie performs an attack.
- target PlayerState — The player or entity being attacked.
Chat Commands▼
Permission levelsA numeric value from 0 (any player) to 1000 (super admin). Commands are only available to players whose permission level meets or exceeds the required value. The values shown in the table are examples only — no fixed role names are defined.
| Command | Syntax | Permission | Description |
|---|---|---|---|
| damagezombie | [entityId] [amount] | Admin | Damages a zombie. |
| destroyblock | [x] [y] [z] | Admin | Destroys a block. |
| fly | Admin | Toggles flight mode. | |
| getpermission | [playerId] | Admin | Returns a player's current permission level. |
| giveitem | [playerName] [itemId] [qty] | Admin | Gives items to a player. |
| help | Player | Lists all available console commands. | |
| help | [command] | Player | Lists all commands available to you, or details for a specific command. |
| killplayer | [playerName] | Admin | Kills a player. |
| killzombie | [entityId] | Admin | Kills a zombie. |
| lua.call | Player | Calls a global Lua function by name. Usage: /lua.call <functionName> | |
| lua.files | Player | Lists all loaded Lua script files from StreamingAssets/Scripts. | |
| quit | Player | Quits the application. | |
| run | Player | Runs a game command through CommandRegistry with full authority. Usage: /run <command> [args...] | |
| setblock | [x] [y] [z] [typeId] | Admin | Sets a block at a grid position. |
| sethealth | [playerName] [amount] | Admin | Sets a player's health. |
| setpermission | [playerId] [level] | MaxLevel | Sets a player's permission level (persisted to permissions.txt). |
| settime | [0.0-1.0] | Admin | Sets the normalized in-game time. |
| setweather | [weatherId] | Admin | Sets the current weather. |
| spawnblock | [blockId] | Moderator | Spawns a registered block entity at your position. |
| spawnzombies | [type=zombie_basic] [count=6] [radius=8] | Admin | Spawns a group of zombies at your position. |
| speed | [value] | Admin | Gets or sets walk speed. |
| sprintspeed | [value] | Admin | Gets or sets sprint speed. |
| summon | [zombieType] | Admin | Spawns a zombie at your position. |
| takedamage | [playerName] [amount] | Admin | Deals damage to a player. |
| teleport | [playerName] [x] [y] [z] | Moderator | Teleports a player to world coordinates. |
| tp | [playerName] [x] [y] [z] | Moderator | Alias for /teleport. |
| triggerhorde | [waveId] | Admin | Triggers a horde wave at the calling player's position. |
No results match your search.