Github Download / Documentation: Link
uses MIT license
Wanted a module which allowed you to easily apply, create, and remove status effects, but couldn’t find any? This OOP module allows you to do so with ease!
Effect example:
local statusManager = require(game.ReplicatedStorage.pathto.StatusEffectManager)
local MyEffect = statusManager.RegisterEffect()
MyEffect.Name = "Test"
function MyEffect:OnStart()
task.wait(6)
self.Destroyed:Once(function()
print("works to detect end")
print(self.Character) --you
end)
--automatically ends
task.wait(35)
--too long, collected after 30 seconds with max lifetime.
end
function MyEffect:OnStop()
print("works too")
end
return MyEffect
How I use it in my game:
It also has extra features, such as detecting if in combat or the last killed character, but this requires the combatchanged / lastkilledchanged signal to be fired in your damage module (same with damage tracking signals). You can remove these if you want.