Rather than making the script dependent on your panel name, just use the "self" that's passed into your panel's script and rename the "self" parameter in the hook function something else, since it's not used anyway:
Code:
hooksecurefunc(Stuf.units.target.hpbar.bar, "SetVertexColor", function(bar, ...)
self.bg:SetVertexColor(...)
end)
^ Now "self.bg" should be fine, since "self" automatically refers to the panel the script is set on, and isn't overwritten by a different "self".