function openSafe(p: player, p2: player): open chest with 5 rows named "&7Sejf &8» &a%{_p2}%" to {_p} set {_!} to 0 loop 45 times: set slot {_!} of {_p}'s current inventory to {Player.sejf.items.%{_p2}%::%{_!}%} add 1 to {_!} on join: if {Player.sejf::%player%} is not set: set {Player.sejf::%player%} to true add 1 of chest named "&7Sejf &8» &a%player%" with lore "&7&oKliknij PPM aby otworzyc" to player on right click: if player's tool is chest: set {_} to uncolored name of player's tool if {_} contains "Sejf": if {_} contains "%player%": openSafe(player, player) else: replace all "Sejf » " in {_} with "" if player has stick named "&7&lŁom": remove 1 stick named "&7&lŁom" from player send "&aOtworzyles sejf uzywajac łomu!" openSafe(player, {_} parsed as offlineplayer) else: send "&cNie mozesz otworzyc tego sejfu! Nie masz łomu!" on inventory close: if uncolored inventory name of player's current inventory contains "Sejf": set {_n} to uncolored inventory name of player's current inventory replace all "Sejf » " in {_n} with "" set {_!} to 0 loop 45 times: set {Player.sejf.items.%{_p2}%::%{_!}%} to slot {_!} of {_p}'s current inventory add 1 to {_!} command /daj []: usage: /daj [nick] permission: sejf.admin permission message: &4Brak uprawnien! trigger: if arg 1 is "sejf": set {_p} to player if arg 2 is set: set {_p} to arg 2 add 1 of chest named "&7Sejf &8» &a%{_p}%" with lore "&7&oKliknij PPM aby otworzyc" to player send "&aOtrzymales sejf!" else if arg 1 is "lom": add 1 of stick named "&7&lŁom" to player send "&aOtrzymales łom!" else: send "&4Uzycie: &c/daj [nick]"