$ProgressBar.value = number
Your question is a bit vague if this isn't what your looking for could please give a bit more information and I will try to help more.
I made a strip of hp, but I can not do it so that it would not be made more than 50.
if hp >= 1:
hp += delta * 2