When you approach a problem like this, first try out “dry” what needs to happen. For example, you could make a sprite with the bar. Set the pivot to the left side, then scale the x value and see what happens. You can then play around in the editor and get a feel for the values you would need for x scale. The bar could also be setup to be scale 100 right away (or done with a mesh or with an SVG sprite etc). If you cannot use the pivot, you get the same result by simply using an empty game object. Add a gizmo so you can see it, and then put as child the bar object underneath so that the empty parent is where the pivot is (i.e. left). When you scale the parent x, the bar should shrink and grow accordingly.
Next, you can start building the FSM that does the “slider pulling” in an automatic fashion, where you need to correspond the HP value to the x scale, i.e. 50 points is x scale 0.5 etc. To do this, use actions like float remap. You probably also need to convert the int to a float to drive the x scale.
Hope that helps,