Backpack this very simple and straightforward script into your projects. That way, if the game glitches out on a forever loop (like my Cheeseburger Chase often does) and the stop button gets “sticky” (JavaScript mouseClicked event fails to detect immediately) or you enabled Guided Access (on Apple devices), then you have an alternate way of “killing” (instantly stopping all code, deleting the instance, and exiting the console) the program. If you backpack this script, you don’t need to give me credit; I didn’t invent the Ctrl+C function. More info is explained in the notes/credits.
The Ctrl+C (equivalent of Cmd+C on MacOS) function is used not only to copy text (on most PC platforms other than iOS) but to kill programs. Please note, if you are using iOS, the Command key is the MacOS equivalent of the Control key, but to quickly kill the program, please use the Command key, not the Control key on your keyboard (since MacOS keyboards have a Control key AND a Command key). Ctrl+C is used in a wide range of languages including Java and Python (and even Jython, a combination of Java and Python!) It can even be used on some block-based languages (like Scratch), as long as they have key press detectors with text-based inputs or droppable dropdowns. However, by default Scratch does not have an option for the Control key, but you can get most keys (except for Backspace) successfully detected if you use a reporter - One common reporter used is a join … … block. On Scratch 3, blocks with rectangular dropdowns indicate that they are not droppable (no reporters can be put in them), and the other blocks with dropdowns can. On Scratch 2, however, it is impossible to determine by sight, as all blocks with dropdowns have rectangular ones - Not just the undroppable. Dropdowns on hat blocks are always undroppable. Scratch has multiple ways to detect multiple keys at once. One way to have regular keys and imported (not in the key dropdown) keys detected at the same time is to have an Event key detector with the regular key selected, and have an if key (…) pressed? then … right below, which is what this project uses. Please note that because this project has 0 scripts that run when triggered by an event (other than the actual Ctrl+C script in the Ctrl+C sprite), trying to use it here is a waste of time. However, if you plug it in anywhere in a project with executable scripts and without a stop button timer activation exploit (the timer being forever reset and scripts being run when the timer is greater than 0.1), and then press Control and C at the same time, you can see that it will work. I implemented it into one of my glitchiest games, Cheeseburger Chase, and to those who are reading this on a mobile device, you have my word that using reporters to get additional keys works in Scratch 3, at least on Windows (if you're not using plugins).