Here is a project I made that is an upgraded version of my original project Heart Clones. This serves the same purpose but it can have half hearts and also does not delete all hearts before adding a new one. Therefore it looks much cleaner! Use the arrow keys to change the number of hearts!
Please use this code in your own games! Make sure to leave a heart and star if you do!