QueueService | Simple Queue System

QueueService

Simple queue system.

Installation

Method 1: Copy the code in init.lua. Then head over to RobloxStudio and make a ModuleScript in ReplicatedStorage. Past the code.

Method 2: Get the Roblox Model(Link To Model). Import it to roblox using the ToolBox and move it to ReplicatedStorage.

Example Use cases

  • Datastore System
  • Music System
  • Limiter
  • HttpService Wrapper
  • Multi Queue System
  • Animation System
  • Handle Lag

Basic Usage

--> Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--> Variables
local QueueService = require(ReplicatedStorage:FindFirstChild("QueueService"))
local MyQueue = QueueService.New("MyQueue", 5, false)

--> Functions
MyQueue:Add(function()
	print("New Item Added to Queue!")
end)

MyQueue:Run()

Using Queue.New

This function initiates the queue, the arguments you need to pass are the Queue Name, Refresh Rate, and if the queue should Bulk Run.

local MyQueue = QueueService.New("MyQueue", 5, false)

Using Queue.Fetch

This function lets you use the same queue in multiple scripts. The only argument you pass through is the queues Name.

local MyQueue = QueueService.Fetch("MyQueue")

Using Add

This function simply adds a item to your queue.

MyQueue:Add(function()
	print("New Item Added to Queue!")
end)

Using Run

This function simply runs the queue according to the refresh rate that was passed through.

MyQueue:Run()

Using Clear

This function simply clears the current queue, the only argument that is passed in determines whether if the remaining functions of the queue should run at once or just simply clear it.

MyQueue:Clear(false)

Using Pause

This function simply pauses the current queue.

MyQueue:Pause()

Using Resume

This function simply resumes the current queue.

MyQueue:Resume()

Contact

Via @Twitter: workframes

Via @Discord: frames#4888

20 Likes

YESS! I’ve needed something like this!

3 Likes

Anytime man! I just added a new function to it as well!

Really useful for proxy servers

1 Like