I'm wanting to make a weapon enchantment that depends on how much magicka you have, and when you land a hit on a target, you drain some of your magicka. I'm not sure how to set a weapon enchantment to drain magicka though. I'm guessing I'll need to do a script effect for it, but I'm not sure how to do this.
Any help would be appreciated.