on join: set slot 4 of player to compass named "&cWybor Trybu..." send "&6Wybierz tryb &cKOMPASEM &6lub &c/tryb" to player on quit: if player has compass named "&cWybor Trybu...": remove compass named "&cWybor Trybu..." from player on leftclick with compass: if name of tool of player is "&cWybor Trybu...": open chest with 5 rows named "&cWybor Trybu..." to player loop 5*9 times: set player's current inventory's slot ((loop-number)-1) to gray glass pane named " " set player's current inventory's slot 11 to beacon named "Tryb 1" with lore "To jest tryb. ||A to druga linijka opisu" set player's current inventory's slot 13 to firework star named "Tryb 2" with lore "To jest tryb. ||A to druga linijka opisu" set player's current inventory's slot 15 to book and Quill named "Tryb 3" with lore "To jest tryb. ||A to druga linijka opisu" set player's current inventory's slot 30 to snowball named "Tryb 4" with lore "To jest tryb. ||A to druga linijka opisu" set player's current inventory's slot 32 to map named "Tryb 5" with lore "To jest tryb. ||A to druga linijka opisu" on inventory click: if inventory name of player's current inventory is "&cWybor Trybu...": cancel event if clicked slot is 11: close player's inventory remove compass named "&cWybor Trybu..." from player execute player command "/komenda" if clicked slot is 13: close player's inventory remove compass named "&cWybor Trybu..." from player execute player command "/komenda" if clicked slot is 15: close player's inventory remove compass named "&cWybor Trybu..." from player execute player command "/komenda" if clicked slot is 30: close player's inventory remove compass named "&cWybor Trybu..." from player execute player command "/komenda" if clicked slot is 32: close player's inventory remove compass named "&cWybor Trybu..." from player execute player command "/komenda"