Here is a small piece of code that recognizes a mouse click then exits and another one that looks to see which sprite was pressed then exits. Also, the mouse click could be a screen touch.
As long as the code is in the loop, you have an exit.
Short version:
do
if ( GetPointerPressed ( ) )
end
endif
sync()
loop
This version looks to see which sprite was pressed:
do
if ( GetPointerPressed ( ) )
sprite = GetSpriteHit ( GetPointerX ( ), GetPointerY ( ) )
endif
if sprite = 5
gosub _splashScreen
endif
if sprite = 6
gosub _endScreen
endif
sync ()
loop