repo stringclasses 302
values | file_path stringlengths 18 241 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 76 697k | tokens int64 10 271k |
|---|---|---|---|---|---|
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/network.luau | luau | .luau | --!strict
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local services = require("@shared/network/services")
local RequestMethods = require("@shared/network/requestMethods")
local ServerRequestMethod = RequestMethods.Server
local ClientRequestMethod = RequestMethods.Clien... | 2,339 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/output.luau | luau | .luau | local Players = game:GetService("Players")
local Network = require("@server/network")
local MessageTypes = require("@shared/output/messageTypes")
local Functions = require("@shared/functions")
local Output = {}
Output.MessageType = MessageTypes
function Output:appendTo(player, messageType, message, dateTime)
assert... | 446 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/scriptManager.luau | luau | .luau | local Output = require("@server/output")
local Network = require("@server/network")
local compile = require("@server/compile")
local Assets = require("@shared/assets")
local WorkerManagers = require("@shared/workerManagers")
local DB = require("@server/db")
local PlayerList = require("@shared/playerList")
local Script... | 1,536 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/wm/sandbox/wrapper/reflection.luau | luau | .luau | local table = table
local setmetatable = setmetatable
local error = error
local coroutine = coroutine
local typeof = typeof
local type = type
local Wrapper
local Rules
local Functions = require("@shared/functions")
local Protection = require("@shared/wm/protection")
local Errors = require("@shared/errors")
local wrap... | 1,212 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/wm/stackTrace.luau | luau | .luau | local table = table
local ipairs = ipairs
local SharedStackTrace = require("@shared/stackTrace")
local Functions = require("@shared/functions")
local StackTrace = setmetatable({}, { __index = SharedStackTrace })
export type StackTrace = SharedStackTrace.StackTrace
-- Get the source of the worker manager (to filter ... | 145 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/server/world/init.luau | luau | .luau | local Players = game:GetService("Players")
local World = {}
World.Base = nil
function World:RemoveBase()
if not self.Base then
return
end
self.Base:Destroy()
self.Base = nil
end
function World:AddBase()
self:RemoveBase()
local base = Instance.new("Part")
base.Name = "Base"
base.Anchored = true
base.CFra... | 284 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/assets.luau | luau | .luau | local Log = require("@shared/log")
local Assets = {}
Assets.assets = {}
function Assets:get(asset)
assert(Assets.assets[asset], `Invalid asset "{asset}".`)
return Assets.assets[asset]
end
function Assets:Init(folderParent, folderName)
Log.debug("Fetching assets...")
-- Set a timeout warning the user if fetching... | 279 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/commands/processResults.luau | luau | .luau | return require("@shared/enum")({
"Success", -- No errors occured, successfully processed and ran command.
"Fail", -- Failed to process command.
"Error", -- Command threw an error while validating or running.
})
| 48 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/AEAD/ChaCha.luau | luau | .luau | --[=[
Cryptography library: ChaCha20
Sizes:
Nonce: 12/24 bytes
Key: 16/32 bytes
Return type: buffer
Example usage:
local Data = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string.rep("k", 32))
local Nonce = buffer.fromstring(string.rep("n", 12))
--------Usage Case 1--------
l... | 5,712 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/AEAD/Poly1305.luau | luau | .luau | --[=[
Cryptography library: Poly1305
Sizes:
Key: 32 bytes
Tag: 16 bytes
Return type: buffer
Example usage:
local Message = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string.rep("k", 32))
local Tag = Poly1305(Message, Key)
--]=]
--!strict
--!optimize 2
--!native
local TAG_SIZE ... | 2,501 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/AEAD/init.luau | luau | .luau | --[=[
Cryptography library: ChaCha20-Poly1305 AEAD
Sizes:
Key: 16/32 bytes
Nonce: 12/24 bytes
Tag: 16 bytes
Rounds: even positive integer (default: 20)
Return type: buffer, buffer (ciphertext, tag)
Example usage:
local Plaintext = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string... | 2,119 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/CSPRNG/Blake3.luau | luau | .luau | --[=[
Cryptography library: Blake3
Sizes:
Key: 32 bytes
Output: variable
Return type: string (hex)
Example usage:
local Message = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string.rep("k", 32))
--------Standard Hash--------
local Hash = Blake3.Digest(Message, 32)
--------... | 3,436 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/CSPRNG/ChaCha20.luau | luau | .luau | --[=[
Cryptography library: ChaCha20
Sizes:
Nonce: 12 bytes
Key: 16/32 bytes
Return type: buffer
Example usage:
local Data = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string.rep("k", 32))
local Nonce = buffer.fromstring(string.rep("n", 12))
--------Usage Case 1--------
loca... | 3,259 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/CSPRNG/Conversions.luau | luau | .luau | --[=[
Cryptography library: Conversions
Return type: string / buffer
Example Usage:
local HexString = Conversions.ToHex(buffer.fromstring("Hello World"))
local OriginalBuffer = Conversions.FromHex("48656c6c6f20576f726c64")
--]=]
--!strict
--!optimize 2
--!native
local ENCODE_LOOKUP = buffer.create(256 * 2)
d... | 1,622 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/CSPRNG/init.luau | luau | .luau | --[=[
Cryptography library: Cryptographically Secure RNG
Usage:
local RandomFloat = CSPRNG.Random()
local RandomInt = CSPRNG.RandomInt(1, 100)
local RandomNumber = CSPRNG.RandomNumber(0.5, 10.5)
local RandomBytes = CSPRNG.RandomBytes(32)
local RandomHex = CSPRNG.RandomHex(16)
local FastString = CSPRNG.R... | 5,293 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/CSPRNG/init.luau | luau | .luau | export type EntropyProvider = (BytesLeft: number) -> buffer?
return require("@shared/crypto/CSPRNG")
| 25 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/Field.luau | luau | .luau | --[=[
Finite field arithmetic modulo Q = 8380417
Arithmetic operations over the prime field Z_q where q = 2^23 - 2^13 + 1.
All operations maintain elements in canonical form [0, Q).
Example usage:
local Field = require(script)
local A = 12345
local B = 67890
local Sum = Field.Add(A, B)
local Product... | 452 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/NTT.luau | luau | .luau | --[=[
Number Theoretic Transform for degree-255 polynomials
Forward and inverse NTT over Z_q for polynomial multiplication.
Uses Cooley-Tukey and Gentleman-Sande algorithms with precomputed roots.
Example usage:
local NTT = require(script)
local Poly = buffer.create(256 * 4) -- 256 coefficients, 4 bytes... | 1,461 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/Pack.luau | luau | .luau | --[=[
Bit packing and unpacking utilities
Serializes polynomials to byte arrays with various bit widths.
Supports encoding/decoding of polynomial coefficients and hint bits.
Example usage:
local BitPacking = require(script)
local Poly = buffer.create(256 * 4)
local Encoded = buffer.create(96) -- For 3-... | 7,184 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/Params.luau | luau | .luau | --[=[
Parameter validation for ML-DSA algorithms
FIPS 204 specification.
Example usage:
local Params = require(script)
local IsValid = Params.CheckKeygenParams(4, 4, 13, 2) -- ML-DSA-44
local ValidEta = Params.CheckEta(2)
--]=]
--!strict
--!optimize 2
--!native
local Q_BIT_WIDTH = 23
local Q = 8380417... | 1,065 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/PolyVec.luau | luau | .luau | --[=[
Vector operations on degree-255 polynomials
Works on vectors of polynomials including matrix multiplication,
NTT transforms, and encoding/decoding for ML-DSA.
Example usage:
local PolyVec = require(script)
local Vec = buffer.create(4 * 256 * 4) -- 4 polynomials
PolyVec.ForwardNTT(Vec, 4)
local ... | 9,568 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/SHA3.luau | luau | .luau | --!strict
--!optimize 2
--!native
local SHA3 = {}
local LOW_ROUND, HIGH_ROUND = buffer.create(96), buffer.create(96)
do
local HighFactorKeccak = 0
local ShiftRegister = 29
local function GetNextBit(): number
local Result = ShiftRegister % 2
ShiftRegister = bit32.bxor((ShiftRegister - Result) // 2, 142 * Result... | 6,804 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/Sampling.luau | luau | .luau | --[=[
ML-DSA Sampling
Example usage:
local Sampling = require(script)
local Rho = buffer.create(32)
local Matrix = buffer.create(4 * 4 * 256 * 4)
Sampling.ExpandA(Rho, Matrix, 4, 4)
--]=]
--!strict
--!optimize 2
--!native
local XOF = require("./XOF")
local BitPacking = require("./Pack")
local Params = ... | 4,934 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/Utils.luau | luau | .luau | --[=[
Utility functions for ML-DSA key and signature sizes
ML-DSA parameters.
Example usage:
local Utils = require(script)
local PubKeySize = Utils.PubKeyLen(4, 13) -- 1312 bytes for ML-DSA-44
local SecKeySize = Utils.SecKeyLen(4, 4, 2, 13) -- 2560 bytes
local SigSize = Utils.SigLen(4, 4, 131072, ... | 450 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/XOF.luau | luau | .luau | --[=[
Stateful SHAKE XOF (Extensible Output Function)
Non-OOP implementation with reusable state buffers.
For ML-DSA sampling functions that use rejection sampling.
Example usage:
local XOF = require(script)
XOF.Reset128()
XOF.Absorb128(message)
local Chunk1 = XOF.Squeeze128(168)
local Chunk2 = XOF... | 7,993 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlDSA/init.luau | luau | .luau | --[=[
ML-DSA (FIPS 204) Digital Signature Algorithm
Post quantum digital signature scheme based on lattice cryptography.
Has three security levels: ML-DSA-44, ML-DSA-65, ML-DSA-87.
Example usage:
local MLDSA = require("@self/MlDSA")
local PubKey, SecKey = MLDSA.ML_DSA_44.GenerateKeys()
local Message = b... | 6,330 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Compression.luau | luau | .luau | --[=[
ML-KEM Compression Module
Polynomial coefficient compression and decompression operations for ML-KEM.
Maps field elements to and from reduced bit representations.
--]=]
--!strict
--!optimize 2
--!native
local Params = require("./Params")
local N = 256
local Q = 3329
local Compression = {}
function Compr... | 1,450 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Field.luau | luau | .luau | --[=[
ML-KEM Field Arithmetic Module
Prime field Zq arithmetic operations for ML-KEM.
Modular arithmetic over the field Z_q where q = 3329.
Example usage:
local Field = require(script.Field)
local Sum = Field.Add(1234, 567)
local Product = Field.Multiply(1234, 567)
local Inverse = Field.Invert(1234)
... | 732 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/NTT.luau | luau | .luau | --[=[
ML-KEM Number Theoretic Transform Module
Number Theoretic Transform (NTT) operations for polynomial multiplication.
Cooley-Tukey NTT and Gentleman-Sande inverse NTT algorithms
Example usage:
local NTT = require(script.NTT)
local Poly = buffer.create(512) -- 256 coefficients * 2 bytes
NTT.Ntt(Pol... | 3,184 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/PKE.luau | luau | .luau | --[=[
ML-KEM Public Key Encryption Module
K-PKE (CPA-secure public key encryption) implementation for ML-KEM.
Provides key generation, encryption, and decryption operations
as specified in NIST FIPS 203.
Example usage:
local PKE = require(script.PKE)
local Seed = buffer.fromstring("32_byte_seed_here..."... | 2,517 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Params.luau | luau | .luau | --[=[
ML-KEM Parameters Module
Parameter validation functions for ML-KEM.
NIST FIPS 203 specification.
Example usage:
local Params = require(script.Params)
local IsValid = Params.CheckKeygenParams(4, 2) -- true
local ValidD = Params.CheckD(11) -- true
local ValidEncrypt = Params.CheckEncryptParams(4,... | 758 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/PolyVec.luau | luau | .luau | --[=[
ML-KEM Polynomial Vector Module
Polynomial vector and matrix operations for ML-KEM.
Vector arithmetic, matrix multiplication, and encoding/decoding
operations on vectors of degree-255 polynomials.
--]=]
--!strict
--!optimize 2
--!native
local Ntt = require("./NTT")
local MlKemParams = require("./Params")
... | 1,610 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Sampling.luau | luau | .luau | --[=[
ML-KEM Sampling Module
Polynomial sampling operations for ML-KEM.
Uniform sampling from Rq and centered binomial distribution sampling.
Example usage:
local Sampling = require(script.Sampling)
local Rho = buffer.create(32)
local Matrix = Sampling.GenerateMatrix(3, Rho, false)
local Sigma = ... | 1,972 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Serialize.luau | luau | .luau | --[=[
ML-KEM Serialization Module
Polynomial encoding and decoding operations for ML-KEM.
Converts polynomials to/from byte arrays with different bit lengths.
Example usage:
local Serialize = require(script.Serialize)
local Poly = buffer.create(512) -- 256 coefficients
local Encoded = Serialize.Encode... | 4,899 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/Utils.luau | luau | .luau | --[=[
ML-KEM Utilities Module
Utility functions for ML-KEM implementation
Example usage:
local Utils = require(script.Utils)
local IsEqual = Utils.CtMemcmp(Buffer1, Buffer2)
Utils.CtCondMemcpy(Condition, Dest, Src1, Src2)
local PubKeySize = Utils.GetKemPublicKeyLen(4) -- 1568 bytes
local SecKeySi... | 1,082 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/MlKEM/init.luau | luau | .luau | --[=[
ML-KEM Main Module (Key Encapsulation Mechanism)
The complete ML-KEM post quantum key encapsulation.
Key generation, encapsulation, and decapsulation operations with
CCA security using the Fujisaki Okamoto transform.
Example usage:
local MlKem = require(script.MlKem)
local CSPRNG = require(script.CSP... | 2,719 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/XXH32.luau | luau | .luau | --[=[
Cryptography library: XXHash32
⚠️ WARNING: XXHash32 wasn't designed with cryptographic security in mind!
Only use for non-security purposes. For security, use SHA256 or higher. ⚠️
Return type: number
Example usage:
local Message = buffer.fromstring("Hello World")
--------Usage Case 1--------
local... | 2,053 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/base64.luau | luau | .luau | --[=[
Cryptography library: Base64
Return type: buffer
Example usage:
local Input = buffer.fromstring("Hello World")
local Encoded = Base64.Encode(Input)
local Decoded = Base64.Decode(Encoded)
--]=]
--!strict
--!optimize 2
--!native
local PADDING_CHARACTER = 61
local ALPHABET_BYTES = buffer.create(64)
do
... | 3,311 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/blake2b.luau | luau | .luau | --[=[
Cryptography library: BLAKE2b
Return type: string
Example usage:
local Message = buffer.fromstring("Hello World")
-- BLAKE2b-128 (128-bit output)
local Result128 = BLAKE2b(Message, 16)
-- BLAKE2b-256 (256-bit output)
local Result256 = BLAKE2b(Message, 32)
-- BLAKE2b-384 (384-bit output)
... | 7,993 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/crypto/blake3.luau | luau | .luau | --[=[
Cryptography library: Blake3
Sizes:
Key: 32 bytes
Output: variable
Return type: string (hex)
Example usage:
local Message = buffer.fromstring("Hello World")
local Key = buffer.fromstring(string.rep("k", 32))
--------Standard Hash--------
local Hash = Blake3.Digest(Message, 32)
--------... | 5,105 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/enum.luau | luau | .luau | local ipairs = ipairs
local table = table
return function(enumItems)
local enum = {}
for index, name in ipairs(enumItems) do
enum[name] = index - 1
enum[index - 1] = name
end
if _G.dev then
setmetatable(enum, {
__index = function(_, index)
return error(`"{index}" is not a valid enum item.`, 2)
end... | 106 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/errors.luau | luau | .luau | local Functions = require("@shared/functions")
local getInstanceName = Functions.getInstanceName
local getFunctionName = Functions.getFunctionName
local Errors = {}
function Errors.cannotAccess(instance: Instance, capability: string?): string
if capability then
return `The current thread cannot access '{getInstan... | 397 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/functions.luau | luau | .luau | -- Maybe this should be rewritten to have each function in it's own file?
local string = string
local game = game
local coroutine = coroutine
local debug = debug
local table = table
local CSPRNG = require("@shared/crypto/CSPRNG")
local Functions = {}
function Functions.empty() end
function Functions.randomString(le... | 523 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/log.luau | luau | .luau | local table = table
local print = print
local warn = warn
local error = error
local TestService = game:GetService("TestService")
local prefix
local Log = {}
function Log:SetPrefix(_prefix)
if prefix then
return error("Prefix is already set.", 2)
end
prefix = _prefix
end
function Log.debug(...: any)
if _G.deb... | 136 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/msgpack.luau | luau | .luau | --!native
--!strict
local msgpack = {}
local band = bit32.band
local bor = bit32.bor
local bufferCreate = buffer.create
local bufferLen = buffer.len
local bufferCopy = buffer.copy
local readstring = buffer.readstring
local writestring = buffer.writestring
local readu8 = buffer.readu8
local readi8 = buffer.readi8
local... | 6,929 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/network/encoding.luau | luau | .luau | --!strict
local MessagePack = require("@shared/msgpack")
local XXH32 = require("@shared/crypto/XXH32")
-- thank you rojo
local CFRAME_ID_LOOKUP_TABLE = table.freeze({
[0x02] = CFrame.fromEulerAnglesYXZ(0, 0, 0),
[0x03] = CFrame.fromEulerAnglesYXZ(math.rad(90), 0, 0),
[0x05] = CFrame.fromEulerAnglesYXZ(0, math.rad(... | 2,240 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/network/requestMethods.luau | luau | .luau | local Enum = require("@shared/enum")
return {
Server = Enum({
"KeyExchange",
"Handshake",
"Event",
"Invoke",
}),
Client = Enum({
"Event",
"InvokeResult",
}),
}
| 57 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/network/services.luau | luau | .luau | -- A list of possible services that the network remotes can be parented to.
if _G.dev then
-- While in development, it might be helpful to know where the remotes are located at.
return { game:GetService("ReplicatedStorage") }
end
-- Some services are commented out because they either might break some scripts, or th... | 253 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/network/utils.luau | luau | .luau | --!strict
local Module = {}
-- as per fips 203 & 204
Module.ML_KEM_1024_PUBLIC_KEY_SIZE = 1568
Module.ML_KEM_1024_CIPHERTEXT_SIZE = 1568
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local Blake3 = require("@shared/crypto/blake3")
local AEAD = require("@shared/c... | 823 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/output/messageTypes.luau | luau | .luau | return require("@shared/enum")({
"Log",
"Warning",
"Error",
"Success",
"Information",
"System",
})
| 33 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/playerList.luau | luau | .luau | --!strict
local table = table
local ipairs = ipairs
-- Only really used for a safe PlayerRemoved (fired after they leave!!) signal (for cleanup things).
local Signal = require("@shared/signal")
local PlayerList = {}
PlayerList.Added = Signal.new()
PlayerList.Removed = Signal.new()
local Players = game:GetService("... | 312 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/protection.luau | luau | .luau | --!strict
local WorkerManagers = require("@shared/workerManagers")
local function protect(instance: Instance, level: "remove" | "write" | "read")
WorkerManagers:Send("protect", instance, level)
end
local function unprotect(instance: Instance)
WorkerManagers:Send("unprotect", instance)
end
return table.freeze({
a... | 88 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/scriptManager/scriptTypes.luau | luau | .luau | return require("@shared/enum")({
"Script",
"LocalScript",
"ModuleScript",
})
| 23 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/signal.luau | luau | .luau | local setmetatable = setmetatable
local Instance = Instance
local math = math
local table = table
local Signal = {}
Signal.__index = Signal
function Signal.new()
local self = setmetatable({}, Signal)
self._bindable = Instance.new("BindableEvent")
self._argMap = {}
-- Events connected first always fire last
self... | 430 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/stackTrace.luau | luau | .luau | local debug = debug
local table = table
local string = string
local ipairs = ipairs
local Functions = require("@shared/functions")
local getFunctionName = Functions.getFunctionName
local StackTrace = {}
export type StackTrace = { { source: string, line: number, name: string? } }
function StackTrace.get(level: numb... | 451 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/wm/communication.luau | luau | .luau | local setmetatable = setmetatable
local table = table
local error = error
local Signal = require("@shared/signal")
local Log = require("@shared/log")
type Signal<Args...> = Signal.Signal<Args...>
local ManagerCommunication = {}
ManagerCommunication.__index = ManagerCommunication
function ManagerCommunication.new(..... | 1,166 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/wm/protection/init.luau | luau | .luau | --!strict
-- number = 0 | 1 | 2
--[[
each further level implies the last
0 - remove protection [ allow reads & writes & descendant inserts ]
1 - remove protection & no writing [ allow reads ]
2 - remove protection & write protection & read protection [ ghost ]
]]
-- local ManagerCommunication = require("@shared/wm/co... | 667 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/modules/shared/workerManagers.luau | luau | .luau | local Log = require("@shared/log")
local Functions = require("@shared/functions")
local ManagerCommunication = require("@shared/wm/communication")
local WorkerManagers = {}
function WorkerManagers:Init(root, managerName)
Log.debug("Creating WorkerManagers...")
-- Messy but whatever
local managerTemplate = root:W... | 758 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/src/client/sb.luau | luau | .luau | local __start = os.clock()
local networkAttribute = { next(script:GetAttributes()) }
local Log = require("@shared/log")
Log:SetPrefix("[SB Client]")
Log.print("Loading...")
do
local wm = require("@shared/wm")
wm.isWorkerManager = false
table.freeze(wm)
end
-- Fetch assets and destroy script
local sbActor = script... | 443 |
Open-SB/OpenSB | Open-SB-OpenSB-5852ada/src/server/sb.server.luau | luau | .luau | local __start = os.clock()
local Log = require("@shared/log")
Log:SetPrefix("[SB]")
Log.print("Loading...")
do
local wm = require("@shared/wm")
wm.isWorkerManager = false
table.freeze(wm)
end
-- Fetch assets and destroy script
local sbActor = script.Parent
local root = sbActor.Parent
do
local thread = coroutine... | 1,270 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/FastCanvas.luau | luau | .luau | --!native
--[[
FastCanvas is a simple, but very fast and efficent
drawing canvas with per pixel methods via EditableImage.
This module was designed to be intergrated with CanvasDraw.
A real-time roblox pixel graphics engine.
This can be used on normal GUI Frames AND Decals, Textures, MeshParts, etc
Writte... | 3,679 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/3x6.luau | luau | .luau | --[[
Font: 3x6
Desc: A very small font set. Designed to fit easily within low res
canveses while still being legible.
96 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(3, 6),
Padding = 1,
Bitmap = {
[" "] = {0b000,0b000,0b000,0b000,0b000,0b000},
["!"] = {0b010,0b010... | 3,046 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/Atari.luau | luau | .luau | --[[
Font: Atari (ATASCII)
Desc: A simple and easy to read 8x8 font set.
97 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(8, 8),
Padding = -1,
Bitmap = {
[" "] = {0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000},
["!"] = {0b00000000... | 5,342 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/Codepage.luau | luau | .luau | --[[
Font: Code page 437 - 8x8
Desc: A detailed font which was used on old IMB PCs.
254 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(8, 8),
Padding = 0,
Bitmap = {
--["NUL"] = {0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000},
[... | 14,235 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/CodepageLarge.luau | luau | .luau | --[[
Font: Code page 437 - 9x16 (VGA version)
Desc: A detailed font which was used on old IMB PCs.
254 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(9, 16),
Padding = 0,
Bitmap = {
--["NUL"] = {0b000000000,0b000000000,0b000000000,0b000000000,0b000000000,0b000000000,0b00... | 26,528 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/GrandCD.luau | luau | .luau | --[[
Font: GrandCD
Desc: A thin 7x8 font set that I designed for CanvasDraw.
92 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(7, 8),
Padding = 0,
Bitmap = {
[" "] = {0b0000000,0b0000000,0b0000000,0b0000000,0b0000000,0b0000000,0b0000000,0b0000000},
["!"] = {0b0000000,0b000... | 5,119 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/Monogram.luau | luau | .luau | --[[
Font: Monogram
Desc: A 6x10 font set based on Monogram.
91 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(6, 10),
Padding = 0,
Bitmap = {
["A"] = {0b000000,0b011100,0b100010,0b100010,0b100010,0b111110,0b100010,0b100010,0b000000,0b000000},
["B"] = {0b000000,0b111100,0b... | 5,244 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/Fonts/Round.luau | luau | .luau | --[[
Font: Round
Desc: A round 6x6 font set.
90 Characters are supported
]]
return {
Lower = false,
CharacterSize = Vector2.new(6, 6),
Padding = 0,
Bitmap = {
["A"] = {0b011100,0b100010,0b111110,0b100010,0b100010,0b000000},
["B"] = {0b111100,0b100010,0b111100,0b100010,0b111100,0b000000},
["C"] = {0b0111... | 3,421 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/ImageDataConstructor.luau | luau | .luau | --!native
local Module = {}
local Lerp = math.lerp
local bit32bor = bit32.bor
local bit32lshift = bit32.lshift
function Module.new(ImageDataResX, ImageDataResY, Buffer)
local ImageData = {
ImageBuffer = Buffer,
ImageResolution = Vector2.new(ImageDataResX, ImageDataResY),
Width = ImageDataResX,
Height = Imag... | 3,060 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/SaveObjectReader.luau | luau | .luau | --!native
local SaveObjReader = {}
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")
local StringCompressor = require(script.Parent:WaitForChild("StringCompressor"))
function SaveObjReader.ReadV3(SaveObject, SlowLoad) -- v4.9.0 and above
local Resolution = SaveObje... | 908 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/StringCompressor.luau | luau | .luau | --!native
-- Module by 1waffle1, optimized by boatbomber
-- https://devforum.roblox.com/t/text-compression/163637
local gsub = string.gsub
local sub = string.sub
local insert = table.insert
local rep = string.rep
local dictionary = {}
do -- populate dictionary
local length = 0
for i = 32, 127 do
if i ~= 34 and i... | 958 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/VectorFuncs.luau | luau | .luau | local Abs = math.abs
function getNormalFromPartFace(part, normalId)
return part.CFrame:VectorToWorldSpace(Vector3.FromNormalId(normalId))
end
function normalVectorToFace(part, normalVector)
local normalIDs = {
Enum.NormalId.Front,
Enum.NormalId.Back,
Enum.NormalId.Bottom,
Enum.NormalId.Top,
Enum.NormalId.... | 507 |
Ethanthegrand/CanvasDraw | Ethanthegrand-CanvasDraw-71923fc/src/init.luau | luau | .luau | --!native
--[[
================== CanvasDraw ===================
Created by: Ethanthegrand (@Ethanthegrand14)
Last updated: 31/1/2026
Version: 4.18.0
Learn how to use the module here: https://devforum.roblox.com/t/1624633
Detailed API Documentation: https://devforum.roblox.com/t/2017699
DUE TO EDITABLEI... | 29,541 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Board/Manifest.luau | luau | .luau | --[[
Manifest system for managing shard configuration in DataStore
]]
local DataStoreService = game:GetService("DataStoreService");
-- Constants
local DEFAULT_RECORD_COUNT = 100;
local OFFLINE_ENVIRONMENT = game.GameId == 0;
-- Only initialize DataStore if not in offline environment
local MANIFEST_DATASTORE: DataSto... | 1,189 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Board/init.luau | luau | .luau | --[[
Arxk was here
]]
-- DataStoreService to handle longer than 42 days (all time most likely)
local DataStoreService = game:GetService("DataStoreService");
-- Requirements
local Packages = script.Parent:FindFirstChild("Packages") or script.Parent.Parent; -- Development Wally places packages in script.Parent... | 4,831 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Logger.luau | luau | .luau | --[=[
@within Logger
@interface Object
@field __index Object
@field new (moduleName: string, debugEnabled: boolean) -> Logger
@field Log (self: Logger, logLevel: number, message: string) -> ()
@field Destroy (self: Logger) -> ()
]=]
type Object = {
__index: Object,
new: (module... | 504 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/UserIdCache.luau | luau | .luau | local Players = game:GetService("Players");
local UserIdsCache = {};
local Processing = {};
local CachedUsernames = {};
local function FetchNameFromAPI(userId: number): string
local Success, Result = pcall(function()
return Players:GetNameFromUserIdAsync(userId);
end);
return Success, Result;
end;
... | 283 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Util/Compression.luau | luau | .luau | local Compression = {};
local LOGARITHMIC_BASE = 1.0000001;
-- Not super precise, but it's good enough for our purposes.
function Compression.Compress(x: number): number
return (x ~= 0 and math.floor(math.log10(x) / math.log10(LOGARITHMIC_BASE)) or 0);
end
function Compression.Decompress(x: number): number
... | 138 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Util/FNV_1a.luau | luau | .luau | local byte = string.byte;
local band = bit32.band;
local bxor = bit32.bxor;
local lshift = bit32.lshift;
local BASIS = 0x811c9dc5;
return function (s: string): number
local h = BASIS;
local len = #s;
for i = 1, len do
h = bxor(h, byte(s, i));
-- 32-bit unsigned multiply by 0x010001... | 160 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/lib/Leaderboard/Util/init.luau | luau | .luau | local HttpService = game:GetService("HttpService");
-- Requirements
local Compression = require(script.Compression);
local FNV_1A_32 = require(script.FNV_1a);
local Util = {};
-- Constants
local MEMORY_STORE_SERVICE_MAX_EXPIRY = 24 * 60 * 60 * 25;
local MEMORY_STORE_SERVICE_MIN_EXPIRY = 60;
local BOARD_TY... | 1,170 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/testing/ServerExamples/MoneyLeaderboards.server.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage");
local Players = game:GetService("Players");
local RunService = game:GetService("RunService");
local LeaderboardTemplate = ReplicatedStorage:WaitForChild("LeaderboardTemplate");
local Leaderboard = require(ReplicatedStorage:WaitForChild("Leaderboard")... | 877 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/testing/ServerExamples/RebirthsLeaderboards.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage");
local Players = game:GetService("Players");
local LeaderboardTemplate = ReplicatedStorage:WaitForChild("LeaderboardTemplate");
local Leaderboard = require(ReplicatedStorage:WaitForChild("Leaderboard"));
type TopData = {Leaderboard.TopData};
-- Constants... | 809 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/testing/ServerExamples/RollingLeaderboards.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage");
local Players = game:GetService("Players");
local LeaderboardTemplate = ReplicatedStorage:WaitForChild("LeaderboardTemplate");
local Leaderboard = require(ReplicatedStorage:WaitForChild("Leaderboard"));
type TopData = {Leaderboard.TopData};
-- Constants... | 651 |
arxk/Leaderboard | arxk-Leaderboard-c1ad2b0/testing/ServerExamples/WinsLeaderboards.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage");
local Players = game:GetService("Players");
local LeaderboardTemplate = ReplicatedStorage:WaitForChild("LeaderboardTemplate");
local Leaderboard = require(ReplicatedStorage:WaitForChild("Leaderboard"));
type TopData = {Leaderboard.TopData};
-- Constants... | 774 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/QueryFilters.luau | luau | .luau | --[[
Filter methods for building database queries.
@module Rest.QueryFilters
@private
]]
local QueryFilters = {}
local Http = game:GetService("HttpService")
--[[
Adds an equality filter (equals).
@param column string -- Column name to filter
@param value any -- Value to compare against
@return table -- Return... | 1,790 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/QueryMutations.luau | luau | .luau | --[[
Mutation methods for inserting, updating, and deleting data.
@module Rest.QueryMutations
@private
]]
local QueryMutations = {}
local Http = game:GetService("HttpService")
-- Re-export types for internal use
local Types = require(script.Parent.Types)
export type InsertOptions = Types.InsertOptions
export type... | 742 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/QueryOperators.luau | luau | .luau | --[[
Filter operators and utilities for building query filters.
@module Rest.QueryOperators
@private
]]
local QueryOperators = {}
local Http = game:GetService("HttpService")
-- Re-export types for internal use
local Types = require(script.Parent.Types)
export type OrFilterOptions = Types.OrFilterOptions
--[[
Ad... | 714 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/Types.luau | luau | .luau | local Types = {}
---------------------------------------------------------------------
-- Base execution interface (available on final stage & also included
-- in intermediate stages so execute() is available anywhere).
---------------------------------------------------------------------
export type BaseExec = {
-- ... | 2,351 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/Utils.luau | luau | .luau | --[[
Utility functions for the Supabase REST client.
@module Rest.Utils
@private
]]
local Utils = {}
--[[
Attempts to load user-provided type definitions from a `Database.Types` ModuleScript.
@param scriptRoot Instance? -- The script root to search from
@return table? -- Loaded types module or nil if not found... | 395 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/Rest/init.luau | luau | .luau | --[[
The main REST client class for interacting with Supabase PostgREST API.
@module Rest
]]
local Rest = {}
Rest.__index = Rest
-- Import dependencies
local Utils = require(script.Utils)
local Types = require(script.Types)
local QueryBuilder = require(script.QueryBuilder)
local RPCBuilder = require(script.RPCBuild... | 535 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/UnitTests/RestTypesTest.luau | luau | .luau | --!strict
-- ModuleScript: RestTypesTest.luau
-- Provides: RestTypesTest.run()
local RestTypesTest = {}
---------------------------------------------------------------------
-- Utilities
---------------------------------------------------------------------
local function hasKey(t: table, k: string)
return t[k] ~= n... | 1,638 |
chteau/Roblox-Supabase | chteau-Roblox-Supabase-8af6e67/src/Supabase/init.luau | luau | .luau | --[[
Main Supabase client module that provides unified access to all Supabase services.
This module serves as the primary entry point for the Supabase client, providing:
- Database queries via PostgREST (select, insert, update, delete, upsert)
- PostgreSQL function calls (RPC)
- Edge Functions invocation
- Compr... | 1,364 |
playcurrent/shards | playcurrent-shards-946b20a/lib/init.luau | luau | .luau | --
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
--
local HttpService = game:GetService("HttpService")
local LocalizationService = game:GetService("LocalizationServi... | 514 |
michaeldougal/AnimNation | michaeldougal-AnimNation-5096968/AnimNation/AnimChain.luau | luau | .luau | local Spring = require(script.Parent:WaitForChild("Spring"))
type Spring = Spring.Spring
export type AnimChainImpl = {
-- Metatable members
__index: AnimChain,
-- Public members
new: (animators: { Spring | Tween }?) -> AnimChain,
AndThen: (AnimChain, callback: () -> ()) -> AnimChain,
Await: (AnimChain) -> An... | 808 |
michaeldougal/AnimNation | michaeldougal-AnimNation-5096968/AnimNation/Spline.luau | luau | .luau | --[[ File Info
Author(s): TactBacon, ChiefWildin (feat. eliphant)
--]]
-- Types
export type SplineImpl = {
-- Metatable members
__index: (self: Spline, key: string) -> any,
__newindex: (self: Spline, key: string, value: any) -> any,
-- Public members
ControlPoints: { CFrame },
Curve: Model,
Parent: Instanc... | 3,415 |
atomic-horizon/order | atomic-horizon-order-52ea61b/src/client/core/external/GuiTemplates.luau | luau | .luau | -- Retrieves GuiTemplates
-- @module GuiTemplates
-- @author Quenty
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TemplateProvider = shared("TemplateProvider") ---@module TemplateProvider
local provider = TemplateProvider.new(ReplicatedStorage.GuiTemplates)
provider:Provide()
return provider... | 66 |
atomic-horizon/order | atomic-horizon-order-52ea61b/src/client/core/lib/UI/AtomicButton.luau | luau | .luau | --[[ File Info
Author(s): ChiefWildin
Module: AtomicButton.luau
Version: 1.3.1
]]
-- Dependencies
local AtomicPane = shared("AtomicPane") ---@module AtomicPane
-- local Sounds = shared("Sounds") ---@module Sounds
-- Types
export type AtomicButtonImpl = ({
-- Metatable members
__index: AtomicButtonImpl,
--... | 2,166 |
atomic-horizon/order | atomic-horizon-order-52ea61b/src/client/core/lib/UI/CoreUI.storybook.luau | luau | .luau | local storybook = {
name = "Core UI",
storyRoots = {
script.Parent,
},
}
return storybook
| 28 |
atomic-horizon/order | atomic-horizon-order-52ea61b/src/client/core/lib/UI/ScreenGui.luau | luau | .luau | --[[ File Info
Author(s): ChiefWildin
Module: ScreenGui.luau
Version: 1.0.0
]]
--[=[
@class ScreenGui
@client
Utility for creating `ScreenGui` instances with sensible defaults.
Automatically parents to `PlayerGui` at runtime, or to `CoreGui` when
running inside a story environment.
]=]
-- Services
local P... | 303 |
atomic-horizon/order | atomic-horizon-order-52ea61b/src/client/core/tasks/AnalyticsClient.luau | luau | .luau | --[[
AnalyticsClient.lua
ChiefWildin
Version: 1.2.0
]]
-- Services
-- Main job table
local AnalyticsClient = { Priority = 5000 }
-- Dependencies
local GamebeastSDK = shared("GamebeastSDK") ---@module GamebeastSDK
-- Constants
-- Global variables
-- Objects
-- Private functions
-- Public functions
-- Frame... | 106 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.