A very basic Fade Out Engine for scene transitions. The wait time can be tweaked to what you think is best. This code can also be used for sprites as well. I reccomend tweaking the ghost effect to your liking.
Feel free to use this code in your scratch games, as long as you credit me :)