How to delete an item in the store after purchase or prohibit its purchase ?
Thanks in advance !
Thanks in advance !
Code:
command /Rank:
trigger:
open chest with 1 rows named "&a&lРанги" to player
format gui slot 0 of player with paper named "test1" with lore "1000"
format gui slot 1 of player with paper named "test2" with lore "2000"
format gui slot 2 of player with paper named "test3" with lore "3000"
on inventory click:
if event-item is paper named "test1" with lore "1000":
cancel event
if player's balance > 999:
remove 1000 from player's balance
execute console command "/giverank test1"
if player's balance < 999:
send "&6no money" to player
cancel event
on inventory click:
if event-item is paper named "test2" with lore "2000":
cancel event
if player's balance > 1999:
remove 2000 from player's balance
execute console command "/giverank test2"
if player's balance < 1999:
send "&6no money" to player
cancel event
on inventory click:
if event-item is paper named "test3" with lore "3000":
cancel event
if player's balance > 2999:
remove 1000 from player's balance
execute console command "/giverank test3"
if player's balance < 2999:
send "&6no money" to player
cancel event