#2nd page
1 messages · Page 1 of 1 (latest)
yes white function is very easy mahe this
import { world } from "@minecraft/server"
function Form(player) {
const form = new ActionFormData()
form.title('name') ///your title
form.button('test') ///your button
form.show(player).then(r => {
if (r.selection === 0) {
Form1(player)
player.runCommandAsync('say a')
}
})
}
function Form1(player) {
const form1 = new ActionFormData()
form1.title('a') ///your new ui title
form1.button('button 1') ///your button
form1.show(player).then(r => {
if (r.selection === 0) {
player.runCommandAsync('say a')
}
})
}
world.afterEvents.itemUse.subscribe((event) => {
const item = event.itemStack
const player = event.source
if (item.typeId === "minecraft:diamond") { ///you can chose an other item with his Id
Form(player)
}
})```
@teal narwhal
someone already helped me sorry
np