Change the variables to change the bars value, position, and size. Feel free to use this in your game! Overall it was just pretty fun to make though. Suggest more things to add for visuals in the future in the comments! Also if you are going to use this in your game and you already have a health system with a max value such as 100 or 10, or any other number, do not worry! just set each "bar max" variable to your maximum number and the scripts will work just the same but accommodated to your health system! this works with the hunger bar, too
All credits to Mojang for the visuals and sound.