Arena API
Write a modA mod registers handlers for events and calls these functions inside them. Nothing else exists in the sandbox — no network, no files, no clock, no page. Every number is clamped by the engine. There is no energy bar: each key cools down on its own, by what pressing it did — every call that changes the world adds its cooldown to that key, calls made in one press add up (to at most 15 s), and your code cannot change any of it.
Power: one mod carries at most 60, a loadout of three at most 100. A handler may run for 3 ms, and a mod may spend 30 ms of CPU each second. One push moves another player at most 16 m/s.
Events — when your code runs
| Call | What it does | Cooldown | Power |
|---|---|---|---|
onAbility(fn(me)) | Runs when the player presses this mod’s key (Q, E or R, by slot). | — | — |
onAbilityHold(fn(me, dt)) | Runs ten times a second while the key is held. | — | — |
onAbilityRelease(fn(me, heldSeconds)) | Runs when the key is let go. | — | — |
onTick(fn(me, dt)) | Runs ten times a second for the whole match. Keep it light. | — | — |
onHit(fn(me, other)) | Runs when something of yours hits a player, or a player bumps into you. | — | — |
onHurt(fn(me, from)) | Runs when you are knocked by somebody else. | — | — |
onLand(fn(me, fallSpeed)) | Runs when you land on the ground. | — | — |
onJump(fn(me)) | Runs when you jump. | — | — |
onRespawn(fn(me)) | Runs when you come back after falling out. | — | — |
onRoundStart(fn(me)) | Runs once when the match starts. A good place to set your looks. | — | — |
onCoreGrabbed(fn(me, byId)) | Runs when anybody picks up the Core. | — | — |
onRingFall(fn(me, ring)) | Runs when a part of the map starts to fall: ring is its index in the fall schedule (0 the stepping stones, then the Garden, the West Ruins, the City, the Temple, the Plaza's edge, the Plaza shrinking). | — | — |
Your body
| Call | What it does | Cooldown | Power |
|---|---|---|---|
self.push(vector) | Push yourself. Up to 14 m/s. | 0.75s | 8 |
self.dash(direction?, power?) | A burst along your look direction (or one you give). Up to 18 m/s. | 1.25s | 12 |
self.jump(power?) | Jump, even in the air. Up to 14 m/s. | 1s | 10 |
self.hover(seconds) | Float with gravity switched off. Up to 3 s. | 6s | 12 |
self.setSpeed(multiplier, seconds) | Run faster or slower (0.4×–1.8×) for up to 8 s. Does nothing in Stick Fight. | 6s | 12 |
self.setGravity(scale, seconds) | Fall slower or faster (0.15×–2.5×) for up to 8 s. Does nothing in Stick Fight. | 6s | 12 |
self.setScale(scale, seconds) | Grow or shrink (0.6×–1.6×) for up to 8 s. Bigger is heavier. Does nothing in Stick Fight. | 8s | 12 |
self.setInvisible(seconds) | Become a faint shimmer for up to 3 s. Does nothing in Stick Fight. | 10s | 14 |
self.shield(seconds) | Nothing can move you for up to 1.5 s. | 12s | 16 |
self.rollback(seconds) | Rewind yourself to where you were up to 3 s ago. Does nothing in Stick Fight. | 12s | 20 |
self.drop() | Let go of the Core. Does nothing in Stick Fight. | — | — |
Making things
| Call | What it does | Cooldown | Power |
|---|---|---|---|
spawnProjectile({ from?, direction?, speed?, look?, color?, size?, push?, gravity?, effect?, lifetime? }) | Fire something. It pushes whoever it hits; `effect` can be "burn", "freeze", "slow" or "pull". | 0.9s | 14 |
spawnBeam({ from?, direction?, range?, color?, push? }) | An instant line that pushes the first player it touches. Up to 30 m. | 1.5s | 16 |
spawnWall({ at?, width?, height?, seconds?, look? }) | A wall in front of you that blocks people for up to 8 s. Does nothing in Stick Fight. | 5s | 10 |
spawnRamp({ at?, length?, seconds? }) | A ramp to launch off, for up to 8 s. Does nothing in Stick Fight. | 5s | 8 |
spawnPad({ at?, power?, seconds? }) | A jump pad anybody can use, for up to 8 s. Does nothing in Stick Fight. | 5s | 8 |
spawnZone({ at?, radius?, effect, seconds?, color? }) | An area that burns (pushes out), freezes, slows, makes slippery, or lifts whoever stands in it. Does nothing in Stick Fight. | 6s | 16 |
spawnDecoy({ at?, seconds? }) | A copy of you that stands still and fools people. Does nothing in Stick Fight. | 8s | 8 |
spawnOrb({ at?, size?, color?, bounce? }) | A heavy ball you can roll into people. Up to 3 at once. Does nothing in Stick Fight. | 3s | 10 |
spawnVehicle("car" | "train" | "board", options?) | A car you drive, a train that crosses the arena on a straight track, or a hover board. Vehicles push people out of their way. Does nothing in Stick Fight. | 20s | 30 |
Forces and fields
| Call | What it does | Cooldown | Power |
|---|---|---|---|
applyForce(targetId, vector) | Push one player or object. Up to 16 m/s. | 1s | 14 |
pullTowards(point, strength, radius) | Pull everything nearby towards a point. Use it in onAbilityHold to keep pulling. | 0.15s | 14 |
pushFrom(point, strength, radius) | Shove everything nearby away from a point. | 2s | 16 |
createGravityField({ at?, radius?, scale, seconds? }) | An area where gravity is weaker or stronger, for up to 8 s. Does nothing in Stick Fight. | 8s | 14 |
createWind({ at?, radius?, direction, strength?, seconds? }) | A gust that keeps pushing one way, for up to 8 s. Does nothing in Stick Fight. | 8s | 14 |
freeze(targetId, seconds) | Stop a nearby player in place for up to 1.2 s. | 10s | 18 |
slow(targetId, factor, seconds) | Slow a nearby player down (down to 0.35×) for up to 3 s. | 6s | 12 |
chain(targetId, seconds) | Tie a nearby player to you, pulling them in for up to 2 s. | 10s | 18 |
The world
| Call | What it does | Cooldown | Power |
|---|---|---|---|
terrain.raise(point, radius, height, seconds) | Lift the ground for up to 6 s. Does nothing in Stick Fight. | 8s | 12 |
terrain.lower(point, radius, depth, seconds) | Sink the ground for up to 6 s. Does nothing in Stick Fight. | 8s | 12 |
terrain.ice(point, radius, seconds) | Make the ground slippery for up to 6 s. Does nothing in Stick Fight. | 6s | 10 |
terrain.bridge(from, to, seconds) | A temporary plank between two points, up to 18 m. Does nothing in Stick Fight. | 6s | 10 |
terrain.crack(point, radius) | Drop the tiles under a point for 4 s. They come back. Does nothing in Stick Fight. | 12s | 18 |
world.query(radius) | What is near you: players, the Core, orbs, vehicles and projectiles. Read-only. | — | — |
world.players() | Every player still in, with position and score. Read-only. | — | — |
world.core() | Where the Core is and who holds it. Read-only. | — | — |
world.time() | Seconds left in the match. Read-only. | — | — |
world.groundAt(point) | The height of the ground under a point, or null over the void. Read-only. | — | — |
Looks and sound
| Call | What it does | Cooldown | Power |
|---|---|---|---|
setWeaponModel({ parts: [{ shape, size, offset?, rotation?, color, emissive?, metal?, rough? }] }) | Redesign what you hold, from up to 24 primitive parts: box, sphere, cylinder, cone, torus, capsule. | 1s | — |
setSkin({ primary, secondary?, pattern?, glow? }) | Your colours. Patterns: solid, stripes, dots, gradient, checker. | 1s | — |
setHat({ parts }) | Something on your head, from up to 12 primitive parts. | 1s | — |
setAura({ color, intensity? }) | A glow around you. | 1s | — |
setTrail({ color, width? }) | A ribbon that follows you. | 1s | — |
emitParticles({ preset, at?, color?, count?, spread?, speed?, lifetime? }) | Fire, smoke, sparks, snow, magic, confetti, dust, lightning, bubbles, leaves or stars. Up to 80 at once. | — | — |
playSound(name) | One of the built-in sounds. | 0.2s | — |
showText(word) | A word over your head, from the built-in list. | 1s | — |
emote(name) | wave, spin, flex, bow, dance or shrug. | 1.5s | — |
Time, cooldowns and timers
| Call | What it does | Cooldown | Power |
|---|---|---|---|
after(seconds, fn) | Run something later. At least 0.25 s, at most 8 pending. | — | — |
every(seconds, fn) | Run something on repeat. At least 0.25 s apart. | — | — |
cancel(timerId) | Stop a timer from after() or every(). | — | — |
energy() | Kept for older mods: 100 while this key is ready, 0 while it cools down. Use cooldown() instead. | — | — |
ready(name) | Whether a call is off cooldown, e.g. ready("self.dash"). | — | — |
cooldown() | Seconds until this key is ready again — 0 when it is. | — | — |
Between your own mods
| Call | What it does | Cooldown | Power |
|---|---|---|---|
emit(eventName, data?) | Tell your other equipped mods something happened. | — | — |
listen(eventName, fn(data)) | Hear what your other mods emit. Combos live here. | — | — |
Extras
| Call | What it does | Cooldown | Power |
|---|---|---|---|
core.nudge(vector) | Knock the Core if it is within 10 m. Up to 12 m/s. Does nothing in Stick Fight. | 2s | 10 |
core.pull(strength) | Pull the Core towards you if it is within 14 m. Use in onAbilityHold. Does nothing in Stick Fight. | 0.15s | 14 |
mirror(radius) | Turn enemy projectiles near you around. They become yours. Does nothing in Stick Fight. | 8s | 16 |
slowTime({ at?, radius?, factor?, seconds? }) | A bubble where everyone else moves slower, for up to 4 s. Does nothing in Stick Fight. | 14s | 20 |
summon("helper-orb" | "bumper" | "drone", options?) | A tiny helper that bumps the nearest enemy for up to 8 s. Up to 2 at once. Does nothing in Stick Fight. | 10s | 18 |
blink(direction?, distance?) | Teleport a short way (up to 8 m) — not over the void. | 6s | 18 |
Named values
Projectile looks: fireball, ice, spark, bubble, rock, plasma, leaf, star, arrow, beam. Zone effects: burn, freeze, slow, slippery, lift. Particles: fire, smoke, spark, snow, magic, confetti, dust, lightning, bubbles, leaves, stars. Sounds: whoosh, boom, zap, pop, chime, thud, laser, horn, woosh-up, sparkle, crack, splash. Words: BOOM, ZAP, WHOOSH, POW, YEET, NOPE, GG, OOPS, NICE, BYE, HEY, WOW, MINE, RUN.
A mod cannot
- remove a player instantly, or change anybody’s score
- touch another player’s mods, code, camera or controls
- reach the network, files, the clock or anything outside the match
- write free text — words over your head come from a fixed list
- change the world for good — every change has a time limit
- see what other players cannot see
Examples
Fire Eyes — Shoot fire from your eyes. It pushes people back and leaves them burning.
onRoundStart((me) => {
setHat({ parts: [
{ shape: 'cone', size: [0.25, 0.35, 0.25], offset: [0, 0.35, 0], color: '#ff6b35', emissive: 1.4 },
{ shape: 'sphere', size: [0.12, 0.12, 0.12], offset: [0, 0.6, 0], color: '#ffd166', emissive: 2 },
] });
});
onAbility((me) => {
for (const side of [-0.12, 0.12]) {
spawnProjectile({
from: { x: me.eyes.x + side * Math.cos(Math.atan2(me.look.z, me.look.x) + Math.PI / 2), y: me.eyes.y, z: me.eyes.z + side * Math.sin(Math.atan2(me.look.z, me.look.x) + Math.PI / 2) },
direction: me.look,
look: 'fireball',
color: '#ff7b00',
speed: 30,
size: 0.28,
push: 10,
effect: 'burn',
});
}
emitParticles({ preset: 'fire', at: 'eyes', color: '#ff9f1c', count: 14, speed: 3, lifetime: 0.4 });
});Magnet Palms — Hold to pull the Core and everyone nearby towards you.
onRoundStart(() => {
setWeaponModel({ parts: [
{ shape: 'torus', size: [0.28, 0.28, 0.08], offset: [0.35, 0, -0.2], rotation: [1.57, 0, 0], color: '#e63946', metal: 0.9, rough: 0.2 },
{ shape: 'box', size: [0.1, 0.16, 0.1], offset: [0.35, -0.22, -0.2], color: '#adb5bd', metal: 1 },
] });
});
onAbilityHold((me) => {
const front = { x: me.position.x + me.look.x * 2, y: me.position.y, z: me.position.z + me.look.z * 2 };
pullTowards(front, 10, 7);
core.pull(8);
emitParticles({ preset: 'magic', at: front, color: '#ff4d6d', count: 6, spread: 2, speed: 1, lifetime: 0.4 });
});Ghost Dash — Dash forward and vanish for two seconds.
onAbility((me) => {
if (self.dash(me.look, 18)) {
self.setInvisible(2);
setTrail({ color: '#c9b8ff', width: 0.5 });
after(2, () => setTrail({ color: null }));
}
});Rocket Jump — Blast yourself into the air, and shove anyone you land near.
let flying = false;
onAbility((me) => {
if (self.jump(14)) {
flying = true;
emitParticles({ preset: 'smoke', at: 'self', color: '#ced4da', count: 30, spread: 0.6, speed: 4, lifetime: 1 });
playSound('boom');
}
});
onLand((me, speed) => {
if (!flying) return;
flying = false;
pushFrom(me.position, 12, 4.5);
showText('POW');
});Battering Car — Summon a car and drive straight through people. Press F to jump out.
onAbility((me) => {
if (!me.inVehicle) spawnVehicle('car', { color: '#ffbe0b', seconds: 12 });
});Sky Train — A train thunders across the arena on the line you are looking along.
onAbility((me) => {
if (spawnVehicle('train', { color: '#e63946' })) showText('RUN');
});