on rightclick on sigm: 1st line of event-block is "[Automat]" wait 2 ticks open chest inventory with 3 rows named "&8&lAutomat z jedzeniem" to player loop 27 times: set slot (loop-number - 1) of player's current inventory to black stained glass pane named "&8" set slot 10 of player's current inventory to steak named "&cStek" with lore "&eCena: &f20" set slot 12 of player's current inventory to apple named "&cJablko" with lore "&eCena: &f10" set slot 14 of player's current inventory to bread named "&cChleb" with lore "&eCena: &f10" set slot 16 of player's current inventory to cooked porkchop named "&cSwinia" with lore "&eCena: &f30" on inventory click: inventory name of event-inventory is "&8&lAutomat z jedzeniem" cancel event event-inventory is not player's inventory if index of event-slot is 10: if player's balance < 20: send "&cMasz za malo pieniedzy!" stop remove 20 from player's balance add 1 steak to player's inventory send "&aZakup pomyslny!" if index of event-slot is 12: if player's balance < 10: send "&cMasz za malo pieniedzy!" stop remove 10 from player's balance add 1 apple to player's inventory send "&aZakup pomyslny!" if index of event-slot is 14: if player's balance < 10: send "&cMasz za malo pieniedzy!" stop remove 10 from player's balance add 1 bread to player's inventory send "&aZakup pomyslny!" if index of event-slot is 16: if player's balance < 30: send "&cMasz za malo pieniedzy!" stop remove 30 from player's balance add 1 cooked porkchop to player's inventory send "&aZakup pomyslny!"