command /heartshop:
trigger:
open chest inventory with 1 rows named "&c&lHeart shop" to player
set slot 0,1,2,3,5,6,7,8,9 of player's current inventory to blue stained glass pane named "&7&lZ"
set slot 3 of player's current inventory to heart of the sea named "&c&lHeart" with lore "&7Purchasable for $700"
set slot 4 of player's current inventory to heart of the sea named "&c&l5 Hearts" with lore "&7Purchasable for $2,800"
set slot 5 of player's current inventory to heart of the sea named "&c&l10 Hearts" with lore "&7Purchasable for $4,900"
on inventory click:
if name of event-inventory is "&c&lHeart shop":
if name of event-item is "&c&lHeart":
if player's balance is greater than 2,800:
remove 700 from the player's balance
make server execute command "/ls edithearts %player% +1"
cancel event
send "&aTransaction complete!"
else:
send "&cSorry, You dont have enough money to buy this."
cancel event
else:
if name of event-item is "&c&l5 Hearts":
if player's balance is greater than 2800:
remove 2800 from the player's balance
make server execute command "/ls edithearts %player% +5"
cancel event
send "&aTransaction complete!"
else:
send "&cSorry, You dont have enough money to buy this."
cancel event
else:
if name of event-item is "&c&l10 Hearts":
if player's balance is greater than 4900:
remove 4900 from the player's balance
make server execute command "/ls edithearts %player% +10"
cancel event
send "&aTransaction complete!"
else:
send "&cSorry, You dont have enough money to buy this."
cancel event