How do I make this

How do I make it that if you don’t press the up arrow then it would be on frame one and if you do then it would be on frame 2.
The thing that happened to me was that I was stuck on frame 2 when I pressed the up arrow.