There’s no way to detect when the max value changed. You can track when the value changes. My recommendation is for you to keep the max value at 100 and use it as a percentage. Then you just calculate the percentage that the slider should be at, and move it when the player gains money.
omggggggggg I put the code that changes the max_value in the _on_h_slider_value_changed function, so it only changed the max_value when I moved the slider value