Spleef

Spleef game board

The popular spleef mini-game.

Try the code:

player.onChat("spleef", function (num1) {
    blocks.fill(
        LAVA,
        pos(0, -1, 0),
        pos(num1, -1, num1),
        FillOperation.Replace
    )
    blocks.fill(
        SNOW,
        pos(0, 4, 0),
        pos(num1, 4, num1),
        FillOperation.Replace
    )
    mobs.teleportToPosition(
        mobs.target(ALL_PLAYERS),
        pos(num1 / 2, 5, num1 / 2)
    )
    gameplay.setGameMode(
        SURVIVAL,
        mobs.target(ALL_PLAYERS)
    )
})