on right click: if clicked block is sign: if line 1 is "&1Ulepszanie": if player's tool is iron sword of sharpness 4 named "&6Test &7Poziom 1": open chest with 1 rows named "Ulepszanie" to player format slot 1 of player with 1 of iron sword of sharpness 4 named "&6Test &7Poziom 1" to be unstealable format slot 2 of player with 1 of anvil named "&7Ulepszasz na &f>" to be unstealable format slot 3 of player with 1 of iron sword of sharpness 5 named "&6Test &7Poziom 2" to be unstealable format slot 5 of player with 1 of paper named "&3Szansa: &f100" with lore "&7Potrzebne przedmioty: &f500 Monet &7oraz &f1 Skora" to be unstealable format slot 7 of player with 1 of stone named "&aUlepsz" to close then run [execute player command "fexy1"] format slot 8 of player with 1 of stone named "&cAnuluj" to close command /fexy1 []: trigger: if player's tool is iron sword of sharpness 4 named "&6Test &7Poziom 1": if player's balance is greater than 500: if player has 1 leather: remove iron sword of sharpness 4 named "&6Test &7Poziom 1" from the player remove 1 leather from the player remove 500 from the player's balance give iron sword of sharpness 5 named "&6Test &7Poziom 2" to the player else: send "&8> &cNie masz wszystkich przedmiotow." to the player else: send "&8> &cNie masz tyle pieniedzy." to the player else: send "&8> &cNie masz wszystkich przedmiotow." to the player