This module is upgraded version of the now deprecated: RateScheduleService
What is this Module for?
This Module helps to avoid black-listing from HTTP rate-limits by distributing the time functions are being called.
Module link
This module is freely available on Roblox here
Module API
Creating a “FuncRate Object”
To create a FuncRate object, use the FuncRate.create()
function, which creates a Meta-table with the functions listed.
Functions
:insert()
FuncRateObj:insert(function,{args})
Adds a function to the schedule of the FRO.
:binsert()
FuncRateObj:binsert({Func:function,Args:{}})
Inserts functions into the schedule of the FRO at BULK
:start()
FuncRateObj:start(Hertz:number,KeepCache:boolean)
Starts processing the Schedule
Hertz: How many command calls per second. Usually command calls are measured by CPS (calls per seconds). To convert CPS to Hertz simply do: *(1/60)CPS = Hertz
KeepCache: If true, the FRO would keep data from processed calls (function & args). Cached Schedules are not yet retrievable. This would be updated in future editions
:yield()
FuncRateObj:yield(Duration:number?)
Yields the processing of the schedule until the duration passes OR the :resume() function is called.
:resume()
FuncRateObj:resume()
Unyields the processing of the schedule.
:ClearSched()
FuncRateObj:ClearSched()
Completely clears the Schedule.
Events
OBF:OnUpdate() returns an RBXScriptSignal that’s fired every time a function is called.
OBF:OnYield() returns an RBXScriptSignal that’s fired every time the OBF is yielded.
OBF:OnError() returns an RBXScriptSignal that’s fired every time a function call returns an error.
OBF:OnResume() returns an RBXScriptSignal that’s fired every time the OBF is resumed/unyielded.
That’s it!
If you got any suggestions or feedback for the module, feel free to comment on this thread or DM my discord: @doytnr
.