every 10 ticks: loop all players: set {_koxy} to number of golden apple:1 in the loop-player's inventory set {_refile} to number of golden apple:0 in the loop-player's inventory set {_perly} to number of ender pearl in the loop-player's inventory set {_rzucak} to number of tnt in the loop-player's inventory if {_koxy} is more than 3: set {_a} to {_koxy}-3 remove {_a} of golden apple:1 from loop-player add {_a} to {schowek.%loop-player%.koxy} send "&cPosiadasz przy sobie wiecej niz 3 koxow, %{_a}% koxow zostaje odlozone do twojego schowka" to loop-player if {_refile} is more than 8: set {_a} to {_refile}-8 remove {_a} of golden apple:0 from loop-player add {_a} to {schowek.%loop-player%.refile} send "&cPosiadasz przy sobie wiecej niz 8 refile, %{_a}% refili zostaje odlozone do twojego schowka" to loop-player if {_perly} is more than 4: set {_a} to {_perly}-4 remove {_a} of ender pearl from loop-player add {_a} to {schowek.%loop-player%.perly} send "&cPosiadasz przy sobie wiecej niz 4 perly, %{_a}% perel zostaje odlozone do twojego schowka" to loop-player command /schowek []: trigger: open chest with 3 rows named "&6&lSchowek" to player wait 1 ticks format slot 11 of player with 1 of enchanted golden apple named "&6Koxy" with lore "Koxow aktualnie posiadasz: &c%{schowek.%player%.koxy}%" to close then run [make player execute command "/wyplac koxy"] format slot 13 of player with 1 of golden apple named "&6Refy" with lore "Refow aktualnie posiadasz: &c%{schowek.%player%.refile}%" to close then run [make player execute command "/wyplac refy"] format slot 15 of player with 1 of ender_pearl named "&6Ender Perly" with lore "Ender perel aktualnie posiadasz: &c%{schowek.%player%.refile}%" to close then run [make player execute command "/wyplac perly"] format slot 22 of player with 1 of wool:5 named "&6Wszystko" with lore "&6&lKoxow aktualnie posiadasz: &c%{schowek.%player%.koxy}% ||&6&lRefow aktualnie posiadasz: &c%{schowek.%player%.refile}% ||&6&lEnder Perel aktualnie posiadasz: &c%{schowek.%player%.perly}%" to close then run [make player execute "/wyplac all"] command /wyplac []: trigger: if arg 1 is "koxy": give {schowek.%player%.koxy} of 3 golden apple:1 to player send "&6wyplasiles ze schowka &6%{schowek.%player%.koxy}% &ckoxow" set {schowek.%player%.koxy} to 0 stop if arg 1 is "refy": give {schowek.%player%.refile} of 8 golden apple:0 to player send "&cWyplasiles ze schowka &6%{schowek.%player%.refile}% &crefili" set {schowek.%player%.koxy} to 0 stop if arg 1 is "perly": give {schowek.%player%.perly} of 4 ender pearl to player send "&8 &cWyplasiles ze schowka &6%{schowek.%player%.perly}% &cperel" set {schowek.%player%.koxy} to 0 stop if arg 1 is "all": give {schowek.%player%.koxy} of golden apple:1 to player give {schowek.%player%.refile} of golden apple:0 to player give {schowek.%player%.perly} of ender pearl to player send "&6&l&cWyplasiles ze schowka &c%{schowek.%player%.perly}% &cperel" send "&6&lWyplasiles ze schowka &c%{schowek.%player%.refile}% &crefili" send "&6&lWyplasiles ze schowka &c%{schowek.%player%.perly}% &cperel" set {schowek.%player%.perly} to 0 set {schowek.%player%.koxy} to 0 set {schowek.%player%.refy} to 0 stop