Skip to content

Instantly share code, notes, and snippets.

View lucasmz-dev's full-sized avatar

Lucas lucasmz-dev

View GitHub Profile

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@lucasmz-dev
lucasmz-dev / Yielder.lua
Last active October 14, 2021 15:32
Yielder (nicer way to do custom resuming)
local Yielder = {}
Yielder.__index = Yielder
function Yielder.new(): Class
return setmetatable({
_thread = nil
}, Yielder)
end
function Yielder:Yield(...): (...any)
@lucasmz-dev
lucasmz-dev / BackpackUtil.lua
Last active October 5, 2021 23:49
BackpackUtil
local StarterGui = game:GetService("StarterGui")
local BackpackUtil = {}
local IsBackpackHidden = false
local HiddenCounter = 0
local function ChangeBackpackVisibility(
isHidden: boolean
)
while true do
@lucasmz-dev
lucasmz-dev / SetCore.lua
Last active October 3, 2021 11:41
SetCore
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
@lucasmz-dev
lucasmz-dev / BetterWaitForChild.lua
Last active October 21, 2021 06:41
WaitForChild but it actually uses .ChildAdded (:WaitForChild uses Stepped)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Janitor = require(ReplicatedStorage.Utils.Janitor)
return function(
parent: Instance,
childName: string
): Instance
assert(
typeof(parent) == 'Instance',
@lucasmz-dev
lucasmz-dev / FastSpawn.lua
Last active October 17, 2021 01:04
Faster Task.Spawn
local FreeThread: thread? = nil
local function RunHandlerInFreeThread(handle, ...)
local thread = FreeThread :: thread
FreeThread = nil
handle(...)
FreeThread = thread
end
@lucasmz-dev
lucasmz-dev / GoodSignal.lua
Last active December 2, 2021 00:35
GoodSignalv2
-- 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
@lucasmz-dev
lucasmz-dev / BindToRenderStep.lua
Last active September 21, 2021 23:03
OOP BindToRenderStep
local RunService: RunService = game:GetService("RunService")
local ScriptBinding = {}
ScriptBinding.__index = ScriptBinding
local BindingId: number = 0
function ScriptBinding:Unbind()
if self._binded == false then
return
@lucasmz-dev
lucasmz-dev / Stamper.lua
Last active September 21, 2021 22:55
Stamper
--[[
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!
]]
@lucasmz-dev
lucasmz-dev / QuickTween.lua
Last active September 21, 2021 23:03
QuickTween
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()