Control the flow of your program: conditionals, loops, error handling, and sprite cloning.
// Pause the script for a number of seconds
self.wait(1);
// Count from one number to another, running code each time
for (let i = 1; i <= 10; i++) {}
// Run code when this sprite is cloned
self.whenCloned(() => {});
// Create a clone of a sprite
self.clone();
// Delete this clone
self.delete();
// Stop the whole project
Scrap.stop();
// Stop the other scripts running on this sprite
self.stopOtherScripts();