As of April 2026, the code editor has been improved with automatic formatting and syntax highlighting to help beginners. Popular Code Snippets That Work
: Instantly teleports you back to the world's starting point.
: Saves your current location so you can return later. /home [name] : Teleports you back to your saved home.
You can use them to create jump pads, set up healing stations, or even obtain "illegal" items like Invisible Solids or Water Blocks that aren't available in the standard creative menu.
These aren't redeemed in a settings menu. Instead, you place a Code Block in a world you own and paste specific JavaScript snippets into the editor.
Players often share these functional "codes" to improve their private worlds: api.giveItem(myId, 'Diamond', 1) . Jump Pad Code: api.setVelocity(myId, 0, 12, 0) .
let hp = api.getHealth(myId); api.setHealth(myId, hp + 70) .