In the Player script

Add a flag variable to indicate if the player is dead or not