function klasyGui(p: player):
set {_gui} to chest inventory with 1 rows named "&9Wybierz klase"
set slot 2 of {_gui} to emerald named "&a&lElfy" with lore "&7Kliknij by wybrac klase Elfa!"
set slot 6 of {_gui} to redstone named "&c&lKrasnoludy" with lore "&7Kliknij by wybrac klase Krasnoluda!"
open {_gui} to player
on inventory click:
if name of event-inventory is "&a&lElfy":
cancel event
event-inventory is not player's inventory
if clicked slot is 2:
send "&7Wybrales/as elfy!"
teleport player to location 1, 100, 1
set {klasa::uzycie::%player%} to true
if clicked slot is 4:
send "&7Wybrales/as krasnoludy!"
teleport player to location 200, 100, 200
set {klasa::uzycie::%player%} to true
on first join:
klasyGui(player)
command /wybierzklase:
trigger:
if {klasa::uzycie::%player%} is false:
klasyGui(player)
Proszę, w razie błędów pisz.