MZ Masking hp and mp bars

So, I'm tryin to learn to code. Decided i would try to edit the hp/mp bars. With help, because i'm really dumb, I was able to figure out how to change their colors. Next i wanteed to try to edit their shape, the person i was talking to suggested that i could try masking or using some unespecified math, but they didn't exactly know how to do either.
Any help would be appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/masking-hp-and-mp-bars.131187/