Leave Gameplay State

Added a check to leave the gameplay state and go back to the main menu