world.beforeEvents.itemUse.subscribe(e => {
if (e.source.typeId == "minecraft:diamond") {
const ui = new ActionFormData()
ui.title("form title")
ui.button("home")
ui.button("lobby")
ui.show(e.source).then(res => {
if (res.selection == 0) {
e.source.runCommand('tp @s 20 -60 20')
}
if (res.selection == 1) {
e.source.runCommand('tp @s 0 -60 0')
}
})
}
})
#Appearance of the menu
1 messages · Page 1 of 1 (latest)
e.source.teleport({ x: 0, y: -60, z: 0})
@tender rock For the UI to work like that go to #1067869374410657962 and for Scripting they showed you above.
Oh alright!
Oh okay! Tysm for the help!
Note @tender rock JSON UI usually always cost money so som1 prob not gonna just give u the ui and code for it unlike this area in the server.
Like im paying 35$ for a JSON UI thing
Understandable, but I'm not asking someone to do the whole thing for me, i just want an example or just a hint that how can I do it so I can get a idea about it and do the thing by myselves
Okay
Thank you for letting me know, though!
Hey, I tried doing it and I was able to make it like this. Could you please tell me how can I apply the ui texture to it? Here's the files i've used, if you want to check it out
You can change the texture of the button by:
"$default_button_texture": "<your texture>",
"$hover_button_texture": "<your texture>",
"$pressed_button_texture":"<your texture>",,
disabledButtonNoBorder",```Put this in light_text_button
Tyy! I need to place it in main.js right? Or do I need to place it somewhere else? I don't understand what you mean by light text button 😅
oh yeah, i got that, ty!
was confused about the light text button thing, but nvm i got this too
thank y'all for the help!