✓ Accepted answer
Since you don't have a script I will tell you how you would want to make it. Basically, what you would want to do is have a GUI with a background and a Bar and make a script that moves the bar back using the bar's size continuously until the bar's size is less than or equal to 0, in which the health would lower or they would die. Also you would need a script inside of whatever is clicked and a click detector and it would need to change the bar's size up by a certain amount. I do agree with itsJooJoo though in what he said with this may end up being complicated if you don't have experience.
If I have helped or answered your question please remember to accept the answer, and if not then please message me or comment what I could have done better!
1 comment
This would be a very complicated script and we'd rather you try first learning about some advanced GUI elements and attempt a script on that before asking us