variables: {Gui.Open.%player%} = false command /gui []: permission: gui.open trigger: set {Gui.Open.%player%} to true open chest with 1 rows named "&cOdblokuj gre" to player arg wait 0.2 second format slot 4 of player arg with 1 of diamond named "&aKliknij by odblokowac!" to close then run [execute player command "guizakoncz"] on any move: if {Gui.Open.%player%} is true: wait 0.05 second execute console command "gui %player%" command /guizakoncz: trigger: if {Gui.Open.%player%} is true: set {Gui.Open.%player%} to false send "&aOdblokowales sie!"