This script will set the players health to max. If the player has boosted health from other items, this item will not be collectable until his/her health is below the maximum base health. Additionally if the player's health is equal its maximum the health will not be collectable until the player has received damage.
Apply this script to any dynamic entity. Entity does not need to have always active on.