command /zaloz: trigger: if {slot0.%player%} is not set: set {slot0.%player%} to "%player's tool%" remove player's tool from player's inventory else if {slot1.%player%} is not set: set {slot1.%player%} to "%player's tool%" remove player's tool from player's inventory # I tak dalej...... command /gui: trigger: wait 2 ticks open chest with 1 rows named "NAZWA" # Dalem przykladowa ilosc linijek :) wait 1 tick if {slot0.%player%} is set: set slot 0 of player's current inventory to {slot0.%player%} if {slot1.%player%} is set: set slot 1 of player's current inventory to {slot1.%player%} # I tak dalej.... on inventory click: if inventory name of player's current inventory is "NAZWA": cancel event if clicked slot is 0: if {slot0.%player%} is set: add {slot0.%player%} to player's inventory clear {slot0.%player%} else if clicked slot is 1: if {slot1.%player%} is set: add {slot1.%player%} to player's inventory clear {slot1.%player%} # I tak dalej .. ....