Skip to content

Instantly share code, notes, and snippets.

@BrandonForbrad
BrandonForbrad / Cooldowns.lua
Created December 12, 2023 15:27
for non yielding cooldown checks
local Cooldown = {}
local ActiveCooldowns = {}
function Cooldown:Check(CooldownName: string, cooldownIndex: "Player or Instance", time: number) : boolean
if ActiveCooldowns[CooldownName] == nil then
ActiveCooldowns[CooldownName] = {}
end
if ActiveCooldowns[CooldownName][cooldownIndex] == nil then
ActiveCooldowns[CooldownName][cooldownIndex] = game.Workspace:GetServerTimeNow()
@BrandonForbrad
BrandonForbrad / RoRun.lua
Last active December 3, 2023 05:48
Roblox networking/worker module script.
local Run = {}
local RunService = game:GetService("RunService")
local Http = game:GetService("HttpService")
local Players = game.Players
Run.Workers = {}
Run.Server = {}
Run.Client = {}
local Network: Folder = nil
@BrandonForbrad
BrandonForbrad / RoInputs.lua
Last active December 16, 2023 18:17
Roblox Lua Input/Device module. This script makes creating inputs for all devices easier and communicating them. (Works with ECS or Event Based/OOP)
--Inputs module
--Created by forbrad 12/02/2023
--v1.0.0.1
local Inputs = {}
---INPUT BINDS----------------------------------------
--KBM | Keyboard and mouse (PC)
--TouchScreen | Any touch screen device (Mobile)
--Controller | Anygame controller (Console)
[
{
"UserId": "50449192",
"reason": "Ban Testing"
}
]