This file contains 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 StarterGui = game:GetService("StarterGui") | |
local BackpackUtil = {} | |
local IsBackpackHidden = false | |
local HiddenCounter = 0 | |
local function ChangeBackpackVisibility( | |
isHidden: boolean | |
) | |
while true do |
This file contains 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 StarterGui = game:GetService("StarterGui") | |
local SetCore = {} | |
function SetCore:ChatActive(active: boolean) | |
StarterGui:SetCore("ChatActive", active) | |
end | |
function SetCore:BadgesNotificationsActive(active: boolean) | |
StarterGui:SetCore("BadgesNotificationsActive", active) | |
end |
This file contains 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 ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local Janitor = require(ReplicatedStorage.Utils.Janitor) | |
return function( | |
parent: Instance, | |
childName: string | |
): Instance | |
assert( | |
typeof(parent) == 'Instance', |
This file contains 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 FreeThread: thread? = nil | |
local function RunHandlerInFreeThread(handle, ...) | |
local thread = FreeThread :: thread | |
FreeThread = nil | |
handle(...) | |
FreeThread = thread | |
end |
This file contains 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
-- https://github.com/RBLXUtils/FastSignal/blob/main/src/ReplicatedStorage/FastSignal/Immediate.lua | |
-- FastSignal's Immediate Mode ended up being made from this code, with some modifications. | |
-- This gist is no longer updated and may contain bugs, check out FastSignal Immediate. | |
local ScriptSignal = {} | |
ScriptSignal.__index = ScriptSignal | |
local ScriptConnection = {} | |
ScriptConnection.__index = ScriptConnection |
This file contains 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 RunService: RunService = game:GetService("RunService") | |
local ScriptBinding = {} | |
ScriptBinding.__index = ScriptBinding | |
local BindingId: number = 0 | |
function ScriptBinding:Unbind() | |
if self._binded == false then | |
return |
This file contains 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
--[[ | |
Stamper.lua: | |
Stamper is a hyper-efficient library made for handling functions | |
that should run every x amount of seconds, | |
With multiple functions, this process can usually cause | |
lag, stamper fixes this, by handling it all in one connection / thread, | |
with custom scheduling! | |
]] |
This file contains 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 TweenService: TweenService = game:GetService("TweenService") | |
local FreeThread: thread? = nil | |
local function DestroyTween(tween: Tween) | |
local thread = FreeThread :: thread | |
FreeThread = nil | |
while true do | |
tween.Completed:Wait() | |
tween:Destroy() |
This file contains 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 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 |