Fighting script?

Can somebody please teach me how to make a script that allows me to cause damage to an enemy while playing a custom animation? I can’t find one anywhere, whenever I copy and paste a script, it doesn’t work, and I’m a total newby to scripting so I have not the slightest clue of how to go about this. Please and thank you!

You can request collaboration to create an script at Unity Forums.