1.

So put in the begining of your game - before it actually starts

LifeBoss = 50

then during the game, everytime he's hit:

LifeBoss -= 5

which means that the value in "LifeBoss" will decrease of 5 units everytime he's hurt.

Then check

if (Lifeboss == 0) { gotoAndPlay (your scene)}

2.

It's the same bit of code, when your final boss life is down to zero, then

if (LifeFinalboss == 0) { gotoAndPlay (your gameoverscene)}

check "gotoAndPlay" in the help for the exact syntax of what you need because you can go to a specific scene, or a specific frame, or a specific frame in a scene.

Now, get famous, earn 350 millions and remember me!