command /shop2 [<text>]:
trigger:
if arg-1 is not set:
set {_balance.%player%} to player's balance
open chest with 3 row named "&a&lShop" to player
format slot 10 of player with diamond named "minerals" to close then run [execute player command "shop2 minerals"]
if arg-1 is "minerals":
close player's inventory
wait 1 second
open chest with 3 row named "&a&lMinerals" to player
format slot 0 of player with coal named "Buy 9 coal for 200" with lore "" to close then run [execute player command "shop2 minerals1al"]
if arg-1 is "minerals1al":
if {_balance.%player%} >= 200:
execute console command "eco take %player% 200"
execute console command "give %player% coal 9"
message "Succesfully bought 9 coal"
else:
message "you haven't got enough money"