Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Services
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Workspace = game:GetService("Workspace")
- -- UI Library (load only once)
- local DiscordLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/UI-Libs/main/discord%20lib.txt"))()
- -- Constants
- local TASK_STATES = {
- INACTIVE = 0,
- ACTIVE = 1,
- PAUSED = 2
- }
- -- Task System Core
- local TaskSystem = {}
- TaskSystem.__index = TaskSystem
- function TaskSystem.new()
- local self = setmetatable({
- tasks = {},
- activeTask = nil,
- state = TASK_STATES.INACTIVE,
- mainThread = nil,
- ui = {
- window = nil,
- statusLabel = nil
- }
- }, TaskSystem)
- self:_initUI()
- return self
- end
- function TaskSystem:_initUI()
- self.ui.window = DiscordLib:Window("Advanced Task System")
- local server = self.ui.window:Server("Task Manager", "")
- self.ui.taskChannel = server:Channel("Tasks")
- self.ui.statusLabel = self.ui.taskChannel:Label("Status: Idle")
- self.ui.settingsChannel = server:Channel("Settings")
- self.ui.settingsChannel:Label("Task Priorities:")
- end
- TaskSystem.new()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement