options: limitkoxow: 4 limitref: 19 limitper: 3 on eat of 322:0: wait 7 ticks if player has {@limitref} 322:0: send "&2&lZabrano refy poniewaz miales ich zbyt duzo!" to player loop 128 times: if player has {@limitref} 322:0: remove 1 322:0 from player's inventory add 1 to {schowek::refy::%player%} On rightclick holding a ender pearl: wait 7 ticks if player has {@limitper} ender pearl: send "&2&lZabrano perly poniewaz miales ich zbyt duzo!" to player loop 64 times: if player has {@limitper} ender pearl: remove 1 ender pearl from player's inventory add 1 to {schowek::perly::%player%} stop on eat of 322:1: wait 7 ticks if player has {@limitkoxow} 322:1: send "&2&lZabrano koxy poniewaz miales ich zbyt duzo!" to player loop 128 times: if player has {@limitkoxow} 322:1: remove 1 322:1 from player's inventory add 1 to {schowek::koxy::%player%} on join: if {schowek::koxy::%player%} is not set: set {schowek::koxy::%player%} to 0 set {schowek::perly::%player%} to 0 set {schowek::refy::%player%} to 0 command /schowek []: trigger: if arg is not set: wait 1 tick open chest with 1 rows named "&6&lSchowek" to player format slot 3 of player with 1 of 368 named "&2&lPosiadasz &6&l%{schowek::perly::%player%}%&2&l perly!" with lore "&2&lKliknij aby wyplacic!" to run [make player execute command "schowek perly"] format slot 4 of player with 1 of 368:1 named "&2&lPosiadasz &6&l%{schowek::koxy::%player%}%&2&l koxy!" with lore "&2&lKliknij aby wyplacic!" to run [make player execute command "schowek koxy"] format slot 5 of player with 1 of 322 named "&2&lPosiadasz &6&l%{schowek::refy::%player%}%&2&l refy!" with lore "&2&lKliknij aby wyplacic!" to run [make player execute command "schowek refy"] if arg is "koxy": if {schowek::koxy::%player%} is greater than 0: give {schowek::koxy::%player%} of 322:1 to player set {schowek::koxy::%player%} to 0 if arg is "refy": if {schowek::refy::%player%} is greater than 0: give {schowek::refy::%player%} of 322 to player set {schowek::refy::%player%} to 0 if arg is "perly": if {schowek::perly::%player%} is greater than 0: give {schowek::perly::%player%} of 368 to player set {schowek::perly::%player%} to 0