JustPaste.it

My skript now

command /teleport:
    trigger:
        set {_gui} to a new chest inventory with 1 row with name "&5Menu"
        set slot 4 of {_gui} to diamond block with name "&4SPAWN"
        set slot 0 of {_gui} to player head with name "&5Players" 
        open {_gui} to player

on inventory click:
    if name of event-inventory is "&5Menu":
        if index of event-slot = 4:
            cancel event
            execute command "/spawn" by player
    if name of event-inventory is "&5Menu":
        if index of event-slot = 0:
            cancel event
            set {_players} to a new chest inventory with 5 row with name "&5Player List"
            #How to do all players head in this gui
            open {_players} to player