Comments in the project to explain everything, though there's not much to be explained This is what you get when you combine trigonometry and intrusive thoughts.
The variables in all caps are "for all sprites," any other variable is "for this sprite only." Setting SMOOTH to 1 will make the value instantly adjust (versus the smooth transition) Play around with the values, see what you like. The VALUE variable is to be replaced with your value (let's just say health) and the max value input in the custom block should be the max value. So let's say I have a health variable and the max health is 100, I would put the health variable in the value input and 100 in the max value input. Everything else is explained inside, although it should be pretty self explanatory.