Well, this should be easy:
1. Add a private variable to your player - health.
2. Create an even with the condition - "is player overlapping safe zone".
3. Right click on the condition, press invert.
4. Add a "substract x from player.health" action to the event.
5. (optional) add an every x seconds to your event, for timing purposes
Was that so hard?
Kids in my day used to read the manual or watch the videos on Youtube,
or at least think for themselves (i am yet to see someone ask more basic questions, sorry,
i just feel that there is a lot of unnecessary content here - spam). Also, GET OFF MY LAWN!
If you meant an actual health bar:
1. Make a 9-patch image with your health bar, set up as needed.
2. Set the left side as a hotspot.
3. Create an "every tick/x seconds" event.
4. Add "set 9-patch width to player.health*SomeRandomAmount" to it.