hello im trying to make When the player first opens the menu, the item should show as Locked with a lore saying LOCKED + price.
If the player clicks it:
Check if they have enough money.
If they don’t → deny the purchase and send a chat message: “You don’t have enough money”.
If they do → take the money, and refresh/close the menu.
After purchase, when they open the menu again, the item should now show as Unlocked with lore saying UNLOCKED.
When they click the Unlocked item, it should teleport the player
idk whats error in my gui now its only take money with out do anythings
menu_title: ':offset_-48::warp:'
open_command: war
register_command: true
size: 54
items:
'warp_s_unlocked':
material: paper
slot: 0
amount: 1
display_name: '&aWarp S'
lore:
- "&a✔ UNLOCKED"
- "&7Click to teleport!"
view_requirements:
has_perm:
type: has_permission
permission: warp.s.unlocked
left_click_commands:
- '[player] warp s'
- '[message] &aTeleporting to warp s...'
'warp_s_locked':
material: paper
slot: 0
amount: 1
display_name: '&cWarp S'
lore:
- "&c✖ LOCKED"
- "&7Price: &6100$"
- "&eClick to purchase!"
view_requirements:
no_perm:
type: "!has_permission"
permission: warp.s.unlocked
left_click_requirements:
has_money:
type: ">="
input: "%vault_eco_balance%"
output: 100
left_click_commands:
- '[console] eco take %player_name% 100'
- '[console] lp user %player_name% permission set warp.s.unlocked true'
- '[message] &a✔ Successfully purchased warp s!'
- '[sound] ENTITY_PLAYER_LEVELUP'
- '[refresh]'
left_click_requirement_fail_commands:
- '[message] &c✖ Insufficient funds! You need 100$'
- '[sound] ENTITY_VILLAGER_NO'
can anyone help me please?