Program Pausable Var Paused As Boolean Var PauseText As String = "Paused. :)" Var NotPauseText As String = "Not Paused. :(" Method Main() Drawing.SetFont( Arial, 20, True, False, False ) While True Beginframe() ClearBackground(white) DoEvents() Pen(False) MoveTo( 10, 100 ) Print("Press 'P' to pause or unpause." ) MoveTo( 10, 10 ) // Detect if the P key was pressed If IsKeyDown("P")Then // Add a loop to make sure we stay inside the If statement until the P key is not pressed anymore. // This makes it so we only toggle the boolean after the key is released. While IsKeyDown("P") DoEvents() Delay(1) End While // Toggle the Paused boolean. Paused = Not Paused // This does the same thing as : //If paused = false Then // Paused = true //Else If Paused = true then // Paused = false //End if // But it is so much faster to type and read. End If If Not Paused Then // What to do when the game IS NOT paused Print( NotPauseText ) Else If Paused Then // What to do when the game IS paused Print( PauseText ) End If RefreshScreen() Delay(1) End While End Method End Program