How to track if player is alive using if statements

Please edit post and use code tags.
It helps read the code nicely.
** Using code tags properly **