This is an engine I made for Attack on COVID platformer, but I figured it would be useful in other games. This engine is easy to use. Run "start game" and everything will reset (except the high score) and the timer will start. Before using this engine in a playthrough (even a test one) you need to set a max time. This is a time limit and is used to calculate the score. It is in seconds, so if you want it in minutes, just multiply the number of minutes by 60. End Game will be used to calculate the final score and, if necessary, update the high score. To use Increase/Decrease score, just set the variable "Increase by" or "Decrease by" to the value, respectively. You then broadcast the respective message. When a player dies, send "player died" and that will be factored in to the final score and the DBR. The DBR is a randomizer used in harder games that makes the game slightly easier the more you die. Or slightly harder, if you implement it the opposite way. To run it, just send "DBR" and use the "DBR result" variable. 1 is more common when you die less, 2 is more common when you die more. Finally, send "reset high score" if you want to reset the high score. To make the high score visible, make a cloud variable for the high score and set it to the local high score after broadcasting "end game". You'll also want to have a receiver for "end game" to show an end screen. "end game" is automatically called when the time runs out. The Score Multiplier (all) multiplies the score that gets added every time you call "increase score". The Score Multiplier (end) multiplies the final score you get at the end. If you want no score multiplier, set the variables to 1. If you set it to 0 you will never get any score.
PATCH NOTES: 1.0: Original Release 1.1: Major Bugfixes 1.1.1: Major bugfix for the timer 1.2: Added Score Multiplier (all) and Score Multiplier (end) BUGS AFFECTING v1.2: -You must set BOTH Score Multipliers to 1 for the score to work -Clicking the stop sign will automatically call "end game", thus generating the score and updating the high score. Showcase Here: https://scratch.mit.edu/projects/536916151/