This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- RecycledDefer is a *PROOF OF CONCEPT*. | |
| -- It should not be used if you wanna spawn threads quickly, AFAIK that's what recycling thread with task.spawn is usually about, | |
| -- this takes a lot longer because of table look ups, and other things. | |
| -- So please, don't use it in an actual production. | |
| --[[ | |
| RecycledDefer: | |
| Library which recycles threads but with .defer, instead of using .spawn, like it usually is done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Bindable: BindableEvent = Instance.new("BindableEvent") | |
| type Event = typeof(Bindable.Event) | |
| local Event: Event = Bindable.Event | |
| return function(_function: (...any) -> (), ...) | |
| if typeof(_function) ~= "function" then | |
| error("Must be a function", 2) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local SoundService = game:GetService("SoundService") | |
| local Sound do | |
| Sound = Instance.new("Sound") | |
| Sound.Name = "Music" | |
| Sound.Parent = SoundService | |
| end | |
| local SongIndex = 1 | |
| local Songs = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Enum = {} | |
| function Enum:__index(enumObjectName) | |
| error(enumObjectName.. " is not a valid EnumItem from".. self._name, 2) | |
| end | |
| function Enum:__newindex() | |
| error("You cannot add new members to an Enum. -".. self._name, 2) | |
| end |
NewerOlder