Timer Service - Lightweight Timer
Github Source Code: TimerService
Overview
A simple memory-efficient timer service that supports:
Start, pause, and reset timers
Automatic cleanup to prevent memory leaks**
Custom callback execution when the timer ends**
How to Use
Creating a Timer
local Timer = require(game.ReplicatedStorage.TimerService)
local myTimer = Timer.new(10, function()
print("Timer ended!")
end)
Starting / Pausing
myTimer:start()
myTimer:pause()
Reset / Destroy
myTimer:reset(true) -- Resets & pauses
myTimer:destroy() -- Cleans up memory
Check Timer State
print("Is running:", myTimer:getIsRunning()) -- true/false
print("Time left:", myTimer:getTimeLeft())
License
This project is licensed under the MIT License .
You are free to use, modify, share, and include this module in commercial projects , including monetized Roblox games.
Read the full license here.
Credits
Made by @natxnek
Feedback & support? Reply below!