Can anyone code this?

Hi, I was wondering if anyone could code weapon damage when you hit an enemy, if you’ve ever played Borderlands, you know what I’m talking about.