Best way to make attack speed system

For my game, weapons have an attack speed. Let’s say a sword can attack every second. Sometimes the sword might have buffs or debuffs, changing the attack speed for a limited time. The change in attack speed changes how long the hitbox lasts, how fast the animation is, how long the cooldown is, and all that. What would be the best solution to this. Would I really have to replace all my yielding functions to a custom one that keeps in mind a players attack speed?

Is the attack speed hardcoded in every weapon’s script?

Each weapon has an attack speed set in their respective settings module, and i use task.wait for the cooldown. so yeah it is hardcoded technically

Hmmm, well that would make things more complicated, but I recommend using Attributes in this case, easy to modify and change