How to make boss health

I am attempting to make it so when you shoot, the boss health lowers a bit, but doesn’t die instantly.

Space to shoot

This Health Bar Example works great for bosses and enemies, all you have to do is draw the phases of the health bar yourself, and connect the spawns and the health functions to the boss.