< HOME

BLOXD CODE API

Cracking open the official documentation directly from bloxd.io/docs!

CHAT api.sendMessage(playerId, "text", options)

Slide right into a specific player's chat feed. Perfect for whispering hidden hints or displaying custom server alert messages in style.

api.sendMessage(playerId, "Welcome to the 10th best fan lobby!", { color: "cyan" });
CHAT api.broadcastMessage("text", options)

Got big news? Use this to send a global chat announcement that every single block-builder currently in the server will see instantly.

api.broadcastMessage("Server rebooting for an epic update!", { color: "red" });
UI api.sendFlyingMiddleMessage(playerId, ["text"], speed)

Need to grab someone's attention? Force text to fly right across the middle of their screen at whatever speed you choose.

api.sendFlyingMiddleMessage(myId, ["LEVEL UP!"], 100);
PHYSICS api.setVelocity(playerId, x, y, z)

Launch your players across the arena! Hard-sets velocity along the X, Y, and Z axes. Perfect for launching jump pads or creating speed zones.

api.setVelocity(myId, 0, 9, 0);
PHYSICS api.applyImpulse(playerId, x, y, z)

YEET! Applies instant physics momentum vectors onto a player entity. Incredible for knockback weapons and gravity triggers.

api.applyImpulse(myId, 9, 0, 9);
KILLFEED api.addCustomKillfeedMessage(options)

Inject custom combat lines directly onto the global battle feed logs. Track spectacular custom elimination records effortlessly.

api.addCustomKillfeedMessage({ name: 'Bob', colour: 'orange', message: 'was vanished into the void' });
HEALTH api.getHealth(playerId) / api.setHealth(playerId, amount)

Keep track of player lifelines. Use this pairing to grab their current health values, check them, or instantly replenish their life pool.

const oldHealth = api.getHealth(myId); api.setHealth(myId, 100);
SYSTEM api.log("text")

Is your custom loop behavior acting weird? Print critical data directly out into your local developer screen tracker to crush bugs immediately.

api.log("Coordinate tracking system fully operational!");