Simply wrap your draw event code in a Boolean condition.
E.g.
CREATE event:
codeComplete = false;
STEP event:
//start of the script
.
.
.
// some stuff happens around here
.
.
.
codeComplete = true; // script has finished running
// end of the script
Note: You could set codeComplete to true via an alarm as most likely the above code will execute way faster than a couple seconds.
E.g.
.
alarm[0] = room_speed * 5; // execute alarm[0] script after 5 seconds
// end of the script
ALARM[0] event
codeComplete = true;
Lastly, in your DRAW event:
if (codeComplete == true)
{
draw_text(50, 50, "Code has been completed!");
}