Life Steal enchantment

Hi, i am working on an enchantment that gives me the inflicted damage back but i can't seem to figure out how to do it. I got the enchantment on my sword but the best i can do is give my player a regeneration effect for a second. Does anyone have an idea? (Using the post_attack predicate)
Continue to help post