Here is a state machine which has a variable named STATE$ which holds a word for which state it is in, you can have as many states as you want, but most games just have a title screen, normal game state, and paused game state
Study this code and learn how it works, because its really well known approach to making an awesome game
Well the single quotation mark (') is used to comment on the code, when the text is green, it will be skipped over as the code is ran, its just to add a comment to make the code less confusing to read