variables: {kredyty.%player%} = 0 command /sklepkredyty []: trigger: open chest with 1 rows named "&aSklep za kredyty" to player format slot 0 of player with 1 of 35:5 named "&2Kupno itemow" to run "yyxxbuyi" format slot 1 of player with 1 of 35:5 named "&2Kupno rang" to run "yyxxbuyr" command /yyxxbuyi: trigger: open chest with 1 rows named "&2Itemy za kredyty" to player format slot 0 of player with 1 of 310 named "&eKup Helm" to run "zakuphelm" command /yyxxbuyr: trigger: open chest with 1 rows named "&2Rangi za kredyty" to player command /zakuphelm: trigger: if {kredyty.%player%} is less than 150: send "&cNie posiadasz tyle kredytow do kupna!" stop else: remove 150 from {kredyty.%player%} give diamond helmet to player send "&cZakupiles Przedmiot za &akredyty!" stop command /kredyty: trigger: send "&6Kredyty > &4%{kredyty.%player%}%" command /shackujkredyty: trigger: add 2000 to {kredyty.%player%}