Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

You need to close out the conditional statement checking if frogX > 800 before checking if gameState is equal to 5. Otherwise, it will only check if gameState is equal to 5 if it's already equal to 4 and if the frogX is NOT > 800.