Weapons slowly lose attack power

I want a script which gradually reduces attack power of weapons.

Basically the more you attack enemies with a weapon,the more the weapon becomes weaker.

So you bring the weapon to blacksmiths or somewhere and they repair the weapon to get back attack power.

I actually have a couple of scripts of durability but they're not what I want because they don't reduce attack power.

Please tell me if you have a good script or can make a good one.

Original thread: https://forums.rpgmakerweb.com/threads/weapons-slowly-lose-attack-power.41881/