Off screen Limit

I watched Game Maker Tool kit a tutorial video about “The Unity Tutorial For Complete Beginners” the flarpy bird then i want to add an off screen limit like when the GameObject goes off the screen the game is over, i can’t think any solution or code anymore so here i am and here’s the code