variables: {a::%player%} = "&aON" command /ustawienia: trigger: set {_} to chest inventory with 1 row named "&dUstawienia" set slot (integers between 0 and 9) of {_} to black stained glass pane named "&8*" set slot 4 of {_} to diamond pickaxe named "&cZamiana ustawienia" with lore "&aAktualnie jest %{a::%player%}%" open {_} to player on inventory click: event-inventory is not player inventory if name of event-inventory is "&dUstawienia": cancel event clicked slot is 4 close player's inventory if {a::%player%} is "&aON": set {a::%player%} to "&cOFF" stop if {a::%player%} is "&cOFF": set {a::%player%} to "&aON" stop on join: while player is online: send action bar "&aZamiana bloków: %{a::%player%}%" to player wait second every 1 second: loop all players where [{a::%input%} is "&aON"]: set {_1} to amount of emerald block in loop-player's inventory set {_2} to amount of diamond block in loop-player's inventory set {_3} to amount of gold block in loop-player's inventory set {_4} to amount of iron block in loop-player's inventory set {_5} to amount of beacon in loop-player's inventory {_1} >= 4 {_2} >= 4 {_3} >= 4 {_4} >= 4 {_5} >= 4 remove 4 of emerald block from loop-player's inventory remove 4 of diamond block from loop-player's inventory remove 4 of gold block from loop-player's inventory remove 4 of iron block from loop-player's inventory remove 4 of beacon from loop-player's inventory give loop-player 1 of sunflower named "&6Samorod"