diff --git a/lib/util.luau b/lib/util.luau index 7c30a09..306917a 100644 --- a/lib/util.luau +++ b/lib/util.luau @@ -1,6 +1,9 @@ local isRoblox = _VERSION == "Luau" local isLune = _VERSION:find("Lune") == 1 -local deps = if isLune then require("../deps") elseif isRoblox then require(script.Parent.deps) else error("Unsupported Runtime!") +local deps = if isLune + then require("../deps") + elseif isRoblox then require(script.Parent.deps) + else error("Unsupported Runtime!") local requires = deps(isRoblox, isLune) local LuauSignal: { @@ -53,7 +56,7 @@ end local RobloxEvent = {} type RobloxEvent = Signal & { - _inner: BindableEvent + _inner: BindableEvent, } function RobloxEvent.new() @@ -62,9 +65,9 @@ function RobloxEvent.new() instance.Name = tostring({}):split(" ")[2] return setmetatable({ - _inner = instance + _inner = instance, }, { - __index = RobloxEvent + __index = RobloxEvent, }) end @@ -74,12 +77,12 @@ end function RobloxEvent.Connect(self: RobloxEvent, callback: (T...) -> ()) local conn = self._inner.Event:Connect(callback) - + return { DisconnectAll = function(self: RobloxEvent) conn:Disconnect() self._inner:Destroy() - end + end, } end @@ -90,7 +93,7 @@ function RobloxEvent.Once(self: RobloxEvent, callback: (T...) -> ()) DisconnectAll = function(self: RobloxEvent) conn:Disconnect() self._inner:Destroy() - end + end, } end