#Ui On Joining

1 messages · Page 1 of 1 (latest)

shut depot
#

How do I make a ui that when u join and click one of these named Air Water Earth And Fire and when u click them it gives u a item for the fire it gives u a lava bucket for water it gives u a water bucket for earth u get dirt and for air u get a stick

vapid palm
#
world.afterEvents.playerSpawn.subscribe(({initialSpawn, player}) => {
    if (initialSpawn) {
        avatarForm(player)
    }
})

async function avatarForm(player) {
    const form = new ActionFormData
    form.title("Choose your nation")
    form.button("Fire")
    form.button("Water")
    form.button("Air")
    form.button("Earth")
    const {selection, canceled} = await form.show(player)
    if (canceled) return
    if (selection == 0) {
        //do fire nation stuff
    }
    if (selection == 1) {
        //do water nation stuff
    }
    //and so on
}```
#

you can do all the /give's and stuff