Server-sided debounce for burst guns?

How do I make a firerate check for burst guns for my server script?

Basically I have a check on the server for the gun’s fire-rate (delay between shots/bursts) but I also have a burstDelay value for each gun that is the delay between each individual burst shot. if you are confused basically here is an example:

burst shot 1 → waits 0.1 seconds (burst delay) → fire burst shot 2 → wait 0.1 seconds → fire burst shot 3 → wait 0.5 seconds (firerate/cooldown between each burst)

its a burst gun, so you can hold the trigger right?

send a signal telling the server that this key is currently being held down, count the shots, and when shots become 3, reset them to 0, and wait a little before allowing shooting again