Be better off adding a game object cube below your playing surface at the distance you want it to ‘die’ at. Set it’s renderer off, but keep a box collider on it. Smash it down a bit thinner than it starts out as, then stretch it out beneath your playing area and out wider than it’s borders to make sure you hit it. Then add an OnTriggerEnter function script to that cube which checks to see if the player dropped into it or not and then if it was the player, do something to your player life-count etc.
But, if you want to do it the way you show above ; then somethin like this->
int lives = 4 ;
bool dead = false ;
void Update(){
if(!dead)
CheckWhereImAt() ;
}
void CheckWhereImAt(){
if(transform.position.y < -5.0f){
lives -- ;
dead = true ;
}
}