If the gui closes itself after opening when the player dies. Cancel the global event that triggered the procedure, ie stop the player dying. Then check when the player closes the gui and kill them manually.
Or the gui might open after the player respawns. If you want that then no need.
Create a new procedure that has a global trigger of on player death and add the open gui block.
Maybe
If the gui closes itself after opening when the player dies. Cancel the global event that triggered the procedure, ie stop the player dying. Then check when the player closes the gui and kill them manually.
Or the gui might open after the player respawns. If you want that then no need.