Super Mario Bros Health Script

As you can see above or (below whereever the file is) there is the word Life with how many "Lives" you have. What I am requesting to be made is a thing that is similar where it lists three lives but when you lose in a battle it than does a event to go to the last checkpoint and it removes one of your hearts or (lives). After all three of the "lives" are gone it will say Gameover. Basically I need a script where I can use a comment or a advanced script event to specify that that map will display your lives and if another map doesn't have that comment or advanced script it wont display that or remove life. If you need a more descriptive description I'll try my best.

9osxvhX.png

Original thread: https://forums.rpgmakerweb.com/threads/super-mario-bros-health-script.34885/