it would be easier if you post a capx that I can tell you based on your code, but I try to explain.
I imagine, that your player object has these 2 variables: CurHealth (Players current health) and MaxHealth (The maximum of health a player can have)
set up a condition: compare instance variable -> CurHealth > MaxHealth ---> Set instance variable: CurHealth = MaxHealth
With this, you don't need to check every time when you add or substract health if it is allowed... this function would just set the health back to the maximum if it is every higher than the allowed value.
Hope my example makes sense