Programming a 2d side scroller melee attack

I urgently need help programming within the 2d side scroller area. I’d like to know how to program a melee attack for my character so that when idle and attacking, the idle attacking animation plays and when running and attacking, a run attack animation plays, along with programming for inflicting damage onto enemies. A screenshot of this programming blueprint would be appreciated but I would appreciate it even more if you could explain the process behind it or even if you are up to it make a video showing how you did it. I can also show you my animations. Thank you so much (also, ok to pay for the help if need be). 