[NEW] RateManager: Cooldown & Rate Limiting Utility (Debounce / Rolling Limit / Queued Calls / Pause / Resume)

:repeat: RateManager

RateManager - The Cooldown / Rate Limit Utility You’ve Been Waiting For

What is RateManager?

RateManager is a new open source module that handles cooldowns and rate limiting cleanly in Roblox Lua.

It’s built to solve one of the most common problems:
“How do I stop players from spamming this button / remote / action?”
And it does that with class

:sparkles: Features

:white_check_mark: Supports Debounce mode
:white_check_mark: Supports RateLimit mode (rolling window, e.g. 10 requests per 60 seconds)
:white_check_mark: Optional queued calls (for clean input batching)
:white_check_mark: Pause / Resume timer support
:white_check_mark: :Reset(), :Cancel() methods with full control
:white_check_mark: Signal-based: OnReset, OnLimitHit
:white_check_mark: MIT licensed — free to use, fork, remix, whatever

:package: Installation

Option A – Manual (Studio)
  1. Get RateManager from the creator store
  2. Drop it into ReplicatedStorage or wherever you keep modules
  3. Require it like:
local RateManager = require(ReplicatedStorage.Packages.RateManager)
Option B – Rojo / Wally More info on how to download using rojo/wally is available on the GitHub README file: https://github.com/krazeems/RateManager/blob/main/README.md

:hammer: Example Usage

:clock3: Debounce (Classic cooldown)

local cooldown = RateManager.new(2) -- 2 sec cooldown

button.MouseButton1Click:Connect(function()
	cooldown:Execute(function()
		print("Clicked!") -- Only fires once every 2 seconds no matter how fast they click.
	end)
end)

:repeat: RateLimit (e.g. 5 calls per 10 seconds)

local limiter = RateManager.new(5, 10, RateManager.Mode.RateLimit)

RunService.Heartbeat:Connect(function()
	limiter:Execute(function()
		print("This runs up to 5 times per 10 seconds")
	end)
end)

:brick: Queueing (Don’t drop excess calls)

limiter:SetQueueEnabled(true) -- only supported with RateLimit mode

:pause_button: Pause + Resume

limiter:Pause() -- Halts cooldown or rate limit logic temporarily, good for cutscenes, disconnections, etc.
wait(5)
limiter:Resume()

:warning: Reset vs Cancel

cooldown:Reset() -- resets timer + will fire onReset
cooldown:Cancel() -- onReset does not get fired for Cancel + resets timer

-- Optional: Pass true to clear any queued calls (RateLimit mode only)
cooldown:Reset(true)
cooldown:Cancel(true)

:satellite: Events

cooldown.OnReset:Connect(function()
	print("Cooldown/Ratelimit reset!")
end)

cooldown.OnLimitHit:Connect(function()
	print("Call was blocked due to cooldown/rate limit")
end)

Get the module here: https://create.roblox.com/store/asset/110870034905030/RateManager
Or download with rojo/wally: More info on rojo/wally installation on GitHub README file

Note: this is my first community resource, so please lmk if I did something, Contributions and suggestions are always welcome!

20 Likes

Seems very interesting. I’ll be using this in my later works, thanks for the resource!

2 Likes

Appreciate that! Glad you find it useful, hit me up if you want more features added or run into any issues. Good luck with your projects!

1 Like

The link for the module doesn’t seem to work. With that being said, this module seems really helpful! Will definitely be checking out!

I haven’t checked the module yet, will definetly use it tho. Does it have any way to change the rate ex: 3 every 2.5 seconds or something like that? Maybe a “_Config” submodule

also…

1 Like

fixed sorry, here’s the link

thanks for letting me know, here’s the new link that should work, lmk if you have any more trouble installing the module

I actually will use this module on a daily basis bro, this is awesome

I would suggest adding “–!nocheck” at the top of the script to get rid of the annoying type error

ive edited the module now to fix this and ive also added some extra type checking stuff

1 Like

I’d love to see this on GitHub and added to wally, that’s the only reason I don’t want to use it currently.

yeah definitely coming soon, ill try to get it up by today or tommorow, ill send a reply to this message to tell you when its available on wally

why do you need this, can’t you just infer if it’s a rate limit by checking if the second argument is provided or not

1 Like

your totally right. when I was building the module, I planned to add more features, but I figured id save that for later. Honestly, I just didn’t want to go back and redo it all for something that minor. :slight_smile:

2 Likes

okay, it should work on wally (I haven’t tested it though): GitHub - krazeems/RateManager: Roblox Lua utility for managing cooldowns, rate limits, and input throttling.

1 Like

Hey! It doesn’t seem to work. did you add it to the wally index?

PS C:\Development\sandbox> wally install
[INFO ] Updating package index https://github.com/UpliftGames/wally-index...
Failed to find a source for krazeems/ratemanager@>=1.0.0, <2.0.0  

sorry I was having some trouble doing that, lmk if its fixed now!