repo
stringclasses
350 values
file_path
stringlengths
29
200
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.01M
tokens
int64
2
598k
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/inst.luau
luau
.luau
local types = require("../types") return @native function(): types.DataType<Instance?> return { write = @native function(value) alloc(1) writeReference(value) end, read = @native function(b: buffer, cursor: number) local refs = readRefs.get() if not refs then return nil, 1 end local ref...
131
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/int16.luau
luau
.luau
local types = require("../types") local int16 = { write = writei16, read = @native function(b: buffer, cursor: number) return buffer.readi16(b, cursor), 2 end, } return @native function(): types.DataType<number> return int16 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/int32.luau
luau
.luau
local types = require("../types") local int32 = { write = writei32, read = @native function(b: buffer, cursor: number) return buffer.readi32(b, cursor), 4 end, } return @native function(): types.DataType<number> return int32 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/int8.luau
luau
.luau
local types = require("../types") local int8 = { write = writei8, read = @native function(b: buffer, cursor: number) return buffer.readi8(b, cursor), 1 end, } return @native function(): types.DataType<number> return int8 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/map.luau
luau
.luau
local types = require("../types") @native local function map( keyType: types.DataType<any>, valueType: types.DataType<any> ): types.DataType<{ [any]: any }> -- Cache these functions to avoid the overhead of the index local key_write = keyType.write local value_write = valueType.write return { read = @native f...
314
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/nothing.luau
luau
.luau
local types = require("../types") local nothing = { write = @native function() end, read = @native function() return nil, 0 end, } return @native function(): types.DataType<nil> return nothing end
50
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/optional.luau
luau
.luau
local types = require("../types") @native local function optional<T>(value_type: types.DataType<T>): types.DataType<T?> local value_read = value_type.read local value_write = value_type.write return { --[[ first byte is a boolean, if it's true, the next bytes are the value of valueType if it's false, its l...
221
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/string.luau
luau
.luau
local types = require("../types") local str = { -- 2 bytes for the length, then the string read = @native function(b: buffer, cursor: number) local length = buffer.readu16(b, cursor) return buffer.readstring(b, cursor + 2, length), length + 2 end, write = @native function(data: string) local length = strin...
122
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/struct.luau
luau
.luau
local types = require("../types") type structData = { [string]: number, } return function<T, V>(input: T & { [string]: types.DataType<V>, }): types.DataType<T> local index_value_type_pairs: { [number]: types.DataType<any>, } = {} local index_key_pairs: { [number]: string } = {} local count = 0 for key in in...
276
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/uint16.luau
luau
.luau
local types = require("../types") local uint16 = { write = writeu16, read = @native function(b: buffer, cursor: number) return buffer.readu16(b, cursor), 2 end, } return @native function(): types.DataType<number> return uint16 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/uint32.luau
luau
.luau
local types = require("../types") local uint32 = { write = writeu32, read = @native function(b: buffer, cursor: number) return buffer.readu32(b, cursor), 4 end, } return @native function(): types.DataType<number> return uint32 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/uint8.luau
luau
.luau
local types = require("../types") local uint8 = { write = writeu8, read = @native function(b: buffer, cursor: number) return buffer.readu8(b, cursor), 1 end, } return @native function(): types.DataType<number> return uint8 end
62
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/unknown.luau
luau
.luau
local read_refs = require("../process/readRefs") local types = require("../types") @native local function unknown(): types.DataType<unknown> return { write = @native function(value: unknown) alloc(1) writeReference(value) end, read = @native function(b: buffer, cursor: number) local refs = read_refs.g...
118
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/vec2.luau
luau
.luau
local types = require("../types") local vec2 = { --[[ 2 float32s, one for X, one for Y ]] read = @native function(b: buffer, cursor: number) return Vector2.new(buffer.readf32(b, cursor), buffer.readf32(b, cursor + 4)), 8 end, write = @native function(value: Vector2) buffer.writef32(0, 0, value.X) buffer...
131
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/data_types/vec3.luau
luau
.luau
local types = require("../types") local vec3 = { __T = ... :: vector, read = @native function(b: buffer, cursor: number) return vector.create( buffer.readf32(b, cursor), buffer.readf32(b, cursor + 4), buffer.readf32(b, cursor + 8) ), 12 end, write = @native function(value: vector) buffer.writef...
136
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/init.luau
luau
.luau
local RunService = game:GetService("RunService") local array = require("@self/data_types/array") local bool = require("@self/data_types/bool") local buff = require("@self/data_types/buff") local cframe = require("@self/data_types/cframe") local client = require("@self/process/client") local define_packet = require("@s...
452
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/packets/packet.luau
luau
.luau
--!native --!optimize 2 local Players = game:GetService("Players") local RunService = game:GetService("RunService") local types = require("../types") local client = require("../process/client") local server = require("../process/server") local run_context: "server" | "client" = if RunService:IsServer() then "server" ...
820
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/process/channel_state.luau
luau
.luau
local types = require("../types") local channel_state: types.ChannelState = { buff = buffer.create(0), ref_map = {}, cursor = 0, } return channel_state
37
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/process/client.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local read = require("./read") local types = require("../types") @native local function onClientEvent(receivedBuffer, ref) read(receivedBuffer, ref) end -- Shared with: src/process/server.luau (Infeasible...
502
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/process/read.luau
luau
.luau
--!optimize 2 --!native local packetIDs = require("../a") local readRefs = require("./readRefs") local ref = packetIDs.ref() local free_thread: thread? @native local function function_passer(fn, ...) local aquiredThread = free_thread free_thread = nil fn(...) free_thread = aquiredThread end @native local functio...
264
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/process/server.luau
luau
.luau
--!native local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local buffer_writer = require("./buffer_writer") local read = require("./read") local types = require("../types") local write_packet = buffer_writer.writ...
1,029
ffrostfall/ByteNet
ffrostfall-ByteNet-fbdb156/src/types.luau
luau
.luau
export type ChannelState = { buff: buffer, cursor: number, ref_map: { [number]: unknown }, } export type PacketProps<T> = { value: T, reliability: ("Reliable" | "Unreliable")?, max_per_frame: number?, } export type DataType<T> = { read __T: T, write: (value: T) -> (), read: (b: buffer, cursor: number) -> ...
234
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/Constants.luau
luau
.luau
--[=[ @class Constants @private Module containing constant values used throughout the Lyra library. ]=] -- Estimated bytes reserved within the DataStore value for Lyra's internal metadata -- (like appliedMigrations, orphanedFiles list, and File object overhead when sharded). -- This ensures that the actual user da...
489
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/Log.luau
luau
.luau
--[=[ @class Log @private Provides a structured logging implementation for the Lyra library. **Design:** - **Callback-based:** Instead of directly printing or sending logs, this module uses a callback function (`logCallback`) provided during logger creation. This allows the consuming application to decide ...
1,495
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/Migrations.luau
luau
.luau
--[=[ @class Migrations @private Provides functionality for managing and applying data migrations. **Concept:** As data schemas evolve over time, older data stored in DataStores needs to be updated to match the new structure. This module allows defining a series of migration steps (`Types.MigrationStep`) that ...
1,880
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/MockDataStoreService.luau
luau
.luau
local HttpService = game:GetService("HttpService") local Tables = require(script.Parent.Tables) local MAX_QUEUE_SIZE = 30 local RATE_LIMITS = { GetAsync = { Base = 60, PlayerMultiplier = 10 }, SetAsync = { Base = 60, PlayerMultiplier = 10 }, UpdateAsync = { Base = 60, PlayerMultiplier = 10 }, RemoveAsync = { Base...
3,923
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/MockMemoryStoreService.luau
luau
.luau
local HttpService = game:GetService("HttpService") local Tables = require(script.Parent.Tables) local MAX_QUEUE_SIZE = 30 local RATE_LIMITS = { GetAsync = { Base = 100, PlayerMultiplier = 10 }, SetAsync = { Base = 100, PlayerMultiplier = 10 }, UpdateAsync = { Base = 100, PlayerMultiplier = 10 }, RemoveAsync = { B...
2,352
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/PlayerStore.luau
luau
.luau
--[=[ A PlayerStore wraps a regular Store to provide a more convenient API for working with Player data. It automatically converts Players to UserId keys and handles player kicks on data errors. ```lua local playerStore = PlayerStore.create({ name = "PlayerData", template = { coins = 0, items = {}, }, ...
4,456
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/PromiseQueue.luau
luau
.luau
--[=[ @class PromiseQueue @private Implements a queue that processes asynchronous operations (represented by functions returning Promises or synchronous functions) one at a time, ensuring serial execution. **Purpose:** Useful for scenarios where operations on a shared resource must not run concurrently to preve...
2,710
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/Types.luau
luau
.luau
--[=[ @class Types @private Common types shared among different modules. ]=] local Log = require(script.Parent.Log) local t = require(script.Parent.Parent.t) --[=[ Represents a single operation within a JSON Patch array. Used for describing changes between data states. @interface PatchOperation @within Types...
1,799
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/hashMapRetry.luau
luau
.luau
--[=[ @class hashMapRetry @private Provides a utility function to wrap Roblox MemoryStoreService HashMap API calls (like `GetAsync`, `SetAsync`, `UpdateAsync`) with automatic retries for specific, commonly transient error conditions identified by error message strings. **Purpose:** Similar to [dataStoreRetry], ...
1,255
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/init.luau
luau
.luau
--[=[ @class Lyra The main entry point and public facade for the Lyra library. This module re-exports the primary functions and constructors needed to interact with Lyra, simplifying the public API and hiding internal module structure. Users of the library should typically only need to require this top-level mod...
383
paradoxum-games/lyra
paradoxum-games-lyra-e8927a9/src/noYield.luau
luau
.luau
--[[ Calls a function and throws an error if it attempts to yield. Pass any number of arguments to the function after the callback. This function supports multiple return; all results returned from the given function will be returned. ]] local function resultHandler(co: thread, ok: boolean, ...) if not ok then ...
169
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/BuildRelease.luau
luau
.luau
--!native --!optimize 2 --!strict local Destroy = require("./Utilities/Destroy") local FileInstance = require("./Classes/FileInstance") local PathUtilities = require("./Utilities/PathUtilities") local warn = require("./Utilities/Warn") local fs = require("@lune/fs") local process = require("@lune/process") local serd...
1,847
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Classes/FileInstance.luau
luau
.luau
--!native --!optimize 2 --!strict local Destroy = require("../Utilities/Destroy") local PathUtilities = require("../Utilities/PathUtilities") local fs = require("@lune/fs") local process = require("@lune/process") export type FileInstance = { FilePath: string, IsDirectory: boolean, Name: string, Parent: FileInst...
1,288
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/EnableLoadModule.luau
luau
.luau
--!native --!optimize 2 local fs = require("@lune/fs") local process = require("@lune/process") local serde = require("@lune/serde") if process.env.windir ~= nil then local appDataPath = process.env.LOCALAPPDATA local robloxVersionsPath = `{appDataPath}\\Roblox\\Versions` if not fs.isDir(robloxVersionsPath) then ...
520
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Packages/SemanticVersion.luau
luau
.luau
--!native --!optimize 2 --!strict local function ParsePrereleaseAndBuildWithSign(value: string): (string, string) local prereleaseWithSign, buildWithSign = string.match(value, "^(-[^+]+)(+.+)$") if prereleaseWithSign == nil or buildWithSign == nil then prereleaseWithSign = string.match(value, "^(-.+)$") buildWit...
1,829
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/UpdateVersion.luau
luau
.luau
--!native --!optimize 2 local SemanticVersion = require("./Packages/SemanticVersion") local fs = require("@lune/fs") local serde = require("@lune/serde") local stdio = require("@lune/stdio") local wally = serde.decode("toml", fs.readFile("wally.toml")) local lastVersion = wally.package.version local lastVersionSema...
366
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Utilities/Destroy.luau
luau
.luau
--!native --!optimize 2 --!strict local fs = require("@lune/fs") local process = require("@lune/process") local HAS_RIM_RAF = (function() if process.os ~= "windows" then return false end return pcall(function() fs.writeDir("swage") process.spawn("rimraf", {"swage"}) end) end)() local Destroy: (path: strin...
145
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Utilities/FileSystemUtilities.luau
luau
.luau
--!native --!optimize 2 --!strict local fs = require("@lune/fs") local FileSystemUtilities = {} function FileSystemUtilities.JustFileName(path: string) return string.match(string.match(path, "^(.+)%..+$") or path, "([^\\/]+)$") or path end function FileSystemUtilities.JustFileNameWithExtension(path: string) return...
435
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Utilities/PathUtilities.luau
luau
.luau
--!native --!optimize 2 local process = require("@lune/process") local PathUtilities = {} local SEPARATOR = if process.os == "windows" then "\\" else "/" PathUtilities.Separator = SEPARATOR --- Fixes the path so that it's properly formatted to the local operating system --- @param path The path to format --- @return...
531
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/.lune/Utilities/Warn.luau
luau
.luau
--!native --!optimize 2 --!strict local Chalk = require("../Packages/Chalk") local ORANGE = Chalk.Rgb(255, 142, 60) local function Concat(...: unknown) local length = select("#", ...) if length == 0 then return "" end if length == 1 then return tostring(...) end if length == 2 then local a, b = ... r...
387
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/FairComparison.bench/Duster.luau
luau
.luau
--!native -- duster -- fast and lightweight maid impl ( thats also better than janitor ) type Types = "table" | "function" | "thread" | "Instance" | "RBXScriptConnection" type TableCleanupMethod = <V>(self: (V & {})) -> () export type Cleanable = | { Disconnect: TableCleanupMethod } | { disconnect: TableCleanupMe...
1,432
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/FairComparison.bench/Janitor18/FastDefer.luau
luau
.luau
--!native --!optimize 2 --!strict local FreeThreads: {thread} = table.create(500) local function RunFunction<Arguments...>(callback: (Arguments...) -> (), thread: thread, ...: Arguments...) callback(...) table.insert(FreeThreads, thread) end local function Yield() while true do RunFunction(coroutine.yield()) en...
193
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/FairComparison.bench/Trove.luau
luau
.luau
--!optimize 2 --!strict local RunService = game:GetService("RunService") export type Trove = { Extend: (self: Trove) -> Trove, Clone: <T>(self: Trove, instance: T & Instance) -> T, Construct: <T, A...>(self: Trove, class: Constructable<T, A...>, A...) -> T, Connect: (self: Trove, signal: SignalLike | RBXScriptSig...
1,927
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/FairComparison.bench/init.luau
luau
.luau
--!optimize 2 --!strict local Duster = require(script.Duster) local Janitor17 = require(script.Janitor17) local Janitor18 = require(script.Janitor18) local Maid = require(script.Maid) local Trove = require(script.Trove) local UltraJanitor18 = require(script.UltraJanitor18) type IProfiler = { Begin: (label: string) -...
2,174
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/UnfairComparison.bench/Janitor18/init.luau
luau
.luau
--!optimize 2 --!strict local FastDefer = require(script.FastDefer) local Promise = require(script.Promise) type Promise<T...> = Promise.TypedPromise<T...> local LinkToInstanceIndex = setmetatable({}, { __tostring = function() return "LinkToInstanceIndex" end; }) local INVALID_METHOD_NAME = "Object is a %* and ...
3,155
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/UnfairComparison.bench/Troveitor/init.luau
luau
.luau
--!optimize 2 --!strict local RunService = game:GetService("RunService") local Janitor = require(script.Parent.Janitor18) local Promise = require(script.Promise) type ConnectionLike = { Connected: boolean, Disconnect: (self: ConnectionLike) -> (), } type SignalLike = { Connect: (self: SignalLike, callback: (...any...
1,296
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/benchmarks/UnfairComparison.bench/init.luau
luau
.luau
--!optimize 2 --!strict -- for reference, unfair in this case means unfair to JANITOR. local Janitor17 = require(script.Janitor17) local Janitor18 = require(script.Janitor18) local Maid = require(script.Maid) local Trove = require(script.Trove) local Troveitor = require(script.Troveitor) type IProfiler = { Begin: (...
1,891
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/luau/run-package-tests.luau
luau
.luau
--!optimize 2 --!strict local ReplicatedStorage = game:GetService("ReplicatedStorage") local Jest = require(ReplicatedStorage.DevPackages.Jest) local processServiceExists, ProcessService = pcall(function() local s = "ProcessService" return game:GetService(s) end) local status, result = Jest.runCLI(ReplicatedStorag...
187
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/src/__tests__/Janitor.test.luau
luau
.luau
--!optimize 2 --!strict _G.__IS_UNIT_TESTING__ = true local ReplicatedStorage = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local JestGlobals = require(script.Parent.Parent.Parent.DevPackages.JestGlobals) local Janitor = require(script.Parent.Parent) local Promise = require(sc...
3,712
howmanysmall/Janitor
howmanysmall-Janitor-47acf39/src/jest.config.luau
luau
.luau
type Serialize = ( value: unknown, config: unknown, indentation: number, depth: number, refs: unknown, printer: Serialize ) -> string type Serializer = { serialize: Serialize, test: (value: unknown) -> boolean, } type JestConfiguration = { clearmocks: boolean?, displayName: nil | string | { name: string, ...
296
ryanlua/satchel
ryanlua-satchel-567d5aa/models/SatchelLoader/Satchel/init.luau
luau
.luau
return require(script.Packages["satchel"])
10
ryanlua/satchel
ryanlua-satchel-567d5aa/models/SatchelLoader/init.client.luau
luau
.luau
--[[ 💖 Thanks for using Satchel 💖 Satchel is a modern open-source alternative to Roblox's default backpack 🎒 📰 DevForum: https://devforum.roblox.com/t/2451549 🛍️ Creator Store: https://create.roblox.com/store/asset/13947506401 🛝 Playground: https://www.roblox.com/join/bxsl5 ]] require(script.Satchel)
105
ryanlua/satchel
ryanlua-satchel-567d5aa/src/Attribution.client.luau
luau
.luau
--!strict --[[ 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 http://mozilla.org/MPL/2.0/. ]] --[[ By using Satchel, you agree to provide attribution in one of the following ways: 1. Keep the Att...
230
ryanlua/satchel
ryanlua-satchel-567d5aa/src/init.luau
luau
.luau
--!nolint DeprecatedApi --[[ 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 http://mozilla.org/MPL/2.0/. ]] local ContextActionService = game:GetService("ContextActionService") local GuiService = ga...
18,993
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/CelestialBodyDragger/init.server.lua
luau
.lua
--------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @ MaximumADHD, 2017 - 2022 -- Celestial Body Dragger -- A plugin that lets you drag -- the sun and moon around ---------------------------------...
844
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Components/Plugin.luau
luau
.luau
local AssetService = game:GetService("AssetService") local RunService = game:GetService("RunService") local Selection = game:GetService("Selection") local Components = script.Parent local Root = Components.Parent local Packages = Root.Packages local Guid = require(Packages.Guid) local React = require(Packages.React) ...
3,186
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Contexts/Plugin.luau
luau
.luau
local Root = script.Parent.Parent local React = require(Root.Packages.React) local PluginContext = React.createContext(newproxy() :: Plugin) local function PluginProvider(props) return React.createElement(PluginContext.Provider, { value = props.Plugin }, props.children) end return { Context = Plug...
74
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Hooks/usePlugin.luau
luau
.luau
local Root = script.Parent.Parent local React = require(Root.Packages.React) local Contexts = Root.Contexts local PluginContext = require(Contexts.Plugin) local function usePlugin(): Plugin return React.useContext(PluginContext.Context) end return usePlugin
56
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Hooks/useProperty.luau
luau
.luau
local Root = script.Parent.Parent local React = require(Root.Packages.React) type function not_nil(ty: type) if ty.tag == "union" then local comps = ty:components() if #comps == 2 then local nilType = types.singleton(nil) local a, b = unpack(comps) if a == nilT...
891
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Hooks/useSelection.luau
luau
.luau
local Selection = game:GetService("Selection") local Hooks = script.Parent local useSignal = require(Hooks.useSignal) local Root = Hooks.Parent local React = require(Root.Packages.React) local function useSelection(): { Instance } local selection, setSelection = React.useState(Selection:Get()) useSignal(Sel...
93
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Hooks/useSignal.luau
luau
.luau
--!strict local Root = script.Parent.Parent local Packages = Root.Packages local React = require(Packages.React) local Signal = require(Packages.Signal) type Signal<T...> = | Signal.Signal<T...> | RBXScriptSignal<T...> local function useSignal<T...>(signal: Signal<T...>?, callback: (T...) -> ()?, deps: {an...
177
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Hooks/useTheme.luau
luau
.luau
local Root = script.Parent.Parent local React = require(Root.Packages.React) local Contexts = Root.Contexts local ThemeContext = require(Contexts.Theme) local function useTheme(): ThemeContext.ThemeState return React.useContext(ThemeContext.Context) end return useTheme
59
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Util/ChangeHistory.luau
luau
.luau
local ChangeHistoryService = game:GetService("ChangeHistoryService") local ChangeHistory = {} local Root = script.Parent.Parent local Guid = require(Root.Packages.Guid) function ChangeHistory.Perform(name: string, action: () -> ()) local guid = Guid.Create() local marker = ChangeHistoryService:TryBeginRecordi...
173
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Util/DecalProjector.luau
luau
.luau
-- DecalProjector -- MaximumADHD -- December 3rd, 2024 --[[This is a port of the decal system used in Valve's Source Engine. Implementation boils down to the following steps: 1. Provide a 'position/orientation/size in 3D space' (hereby labeled λ) against the surface of the mesh. 2. Scale λ to the original dimens...
5,581
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/Util/PrimitiveBuilder.luau
luau
.luau
local PrimitiveBuilder = {} local function getFaceAxes(normalId: Enum.NormalId): (Vector3, Vector3, Vector3) if normalId == Enum.NormalId.Front then return -Vector3.zAxis, Vector3.xAxis, Vector3.yAxis elseif normalId == Enum.NormalId.Back then return Vector3.zAxis, -Vector3.xAxis, Vector3.yAxis elseif normalId ...
2,267
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/DecalProjector/Plugin/init.server.luau
luau
.luau
-- DecalProjector -- Author: MaximumADHD -- Created: 4/18/2026 local MainToolbar = plugin:CreateToolbar("Decal Projector") local MainToggle = MainToolbar:CreateButton( "Decal Projector", "Open the Decal Projector", "rbxassetid://15658721128" ) local MainWidget = (function () local config = DockWidget...
472
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/MeshOptimization/src/Themes.lua
luau
.lua
local Themes: { [string]: { [string]: any } } Themes = { Div = { BackgroundColor3 = Enum.StudioStyleGuideColor.Border, }, Text = { TextColor3 = Enum.StudioStyleGuideColor.MainText, }, Input = { BackgroundColor3 = Enum.StudioStyleGuideColor.InputFieldBackgro...
176
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/MeshOptimization/src/init.server.lua
luau
.lua
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @ MaximumADHD, 2016-2023 -- Mesh Optimization Tools ------------------------------------------...
3,016
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/QuickInsert/Plugin/Modules/AssetMap.lua
luau
.lua
local AssetMap = {} :: { [number]: Enum.AssetType } for i, assetType in pairs(Enum.AssetType:GetEnumItems()) do AssetMap[assetType.Value] = assetType end return AssetMap
48
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/QuickInsert/Plugin/Modules/ThemeConfig.lua
luau
.lua
return { Background = { BackgroundColor3 = "MainBackground", }, Input = { BackgroundColor3 = "InputFieldBackground", BorderColor3 = "InputFieldBorder", TextColor3 = "MainText", }, Error = { TextColor3 = "ErrorText", }, Title = { TextColor3 = "TitlebarText", }, Template = { BackgroundColor3 = ...
97
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/QuickInsert/Plugin/init.server.lua
luau
.lua
-------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @ MaximumADHD, 2018-2023 -- Quick Insert Plugin ------------------------------------------------------------------------------------------------------------...
2,607
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/RojoMeshParts/Plugin/init.server.lua
luau
.lua
--!strict local ChangeHistoryService = game:GetService("ChangeHistoryService") local CollectionService = game:GetService("CollectionService") local InsertService = game:GetService("InsertService") local StudioService = game:GetService("StudioService") local Selection = game:GetService("Selection") local modelIcon = S...
1,003
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/StreamingDebugger/Plugin/ThemeConfig.lua
luau
.lua
return { Background = { BackgroundColor3 = "MainBackground"; }; Input = { BackgroundColor3 = "InputFieldBackground"; BorderColor3 = "InputFieldBorder"; TextColor3 = "MainText"; }; Error = { TextColor3 = "ErrorText"; }; Info = { TextColor3 = "MainText"; }; Title = { TextColor3 = "Ti...
108
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/StreamingDebugger/Plugin/init.server.lua
luau
.lua
-------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @ CloneTrooper1019, 2020 -- Streaming Debugger -------------------------------------------------------------------------------------------------------------...
898
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/CollapsibleTitledSection.lua
luau
.lua
---------------------------------------- -- -- CollapsibleTitledSectionClass -- -- Creates a section with a title label: -- -- "SectionXXX" -- "TitleBarVisual" -- "Contents" -- -- Requires "parent" and "sectionName" parameters and returns the section and its contentsFrame -- The entire frame will resize dynamic...
1,348
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/CustomTextButton.lua
luau
.lua
---------------------------------------- -- -- CustomTextButton.lua -- -- Creates text button with custom look & feel, hover/click effects. -- ---------------------------------------- GuiUtilities = require(script.Parent.GuiUtilities) local kButtonImageIdDefault = "rbxasset://textures/TerrainTools/button_default.png" ...
594
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/GuiUtilities.lua
luau
.lua
local module = {} module.kTitleBarHeight = 27 module.kInlineTitleBarHeight = 24 module.kStandardContentAreaWidth = 180 module.kStandardPropertyHeight = 30 module.kSubSectionLabelHeight = 30 module.kStandardVMargin = 7 module.kStandardHMargin = 16 module.kCheckboxMinLabelWidth = 52 module.kCheckboxMinMargin = 12 m...
1,836
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/ImageButtonWithText.lua
luau
.lua
---------------------------------------- -- -- ImageButtonWithText.lua -- -- An image button with text underneath. Standardized hover, clicked, and -- selected states. -- ---------------------------------------- GuiUtilities = require(script.Parent.GuiUtilities) ImageButtonWithTextClass = {} ImageButtonWithTextClass...
1,151
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/LabeledTextInput.lua
luau
.lua
---------------------------------------- -- -- LabeledTextInput.lua -- -- Creates a frame containing a label and a text input control. -- ---------------------------------------- GuiUtilities = require(script.Parent.GuiUtilities) local kTextInputWidth = 100 local kTextBoxInternalPadding = 4 LabeledTextInputClass = {}...
917
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/ProgressFrame.lua
luau
.lua
---------------------------------------- -- -- ProgressFrame.lua -- -- Creates a frame that has a progress bar. -- ---------------------------------------- local GuiUtilities = require(script.Parent.GuiUtilities) local kWidth = 400 local kHeight = 160 local kStandardHMargin = 10 local kStandardVMargin = 5 local kBar...
888
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/TabbableVector3Input.lua
luau
.lua
---------------------------------------- -- -- TabbableVector3Input.lua -- -- Creates a frame containing a label and a text input control. -- that can be linked to other TabbableVector3Input Copied mostly from LabeldTextInput -- but will be replace when we go to Roact ---------------------------------------- local GuiU...
2,581
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Modules/VerticallyScalingListFrame.lua
luau
.lua
---------------------------------------- -- -- VerticallyScalingListFrame -- -- Creates a frame that organizes children into a list layout. -- Will scale dynamically as children grow. -- ---------------------------------------- GuiUtilities = require(script.Parent.GuiUtilities) VerticallyScalingListFrameClass = {} Ver...
465
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Plugin/TerrainImporter.lua
luau
.lua
-- 24RightAngles -- Modified by CloneTrooper1019 local module = {} local importer = script.Parent local core = importer.Parent local modules = core.Modules local GuiUtilities = require(modules.GuiUtilities) local ProgressFrame = require(modules.ProgressFrame) local CustomTextButton = require(modules.CustomTextButton...
2,966
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/TerrainImporter/Plugin/main.server.lua
luau
.lua
------------------------------------------------------------------------------------------------------------------------------------------------------------ -- @ CloneTrooper1019, 2019 -- main.server.lua --------------------------------------------------------------------------------------------------------------------...
524
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/ToolGripEditor/Plugin/Modules/ToolEditor.lua
luau
.lua
local ChangeHistoryService = game:GetService("ChangeHistoryService") local Selection = game:GetService("Selection") local Players = game:GetService("Players") local Modules = script.Parent local Project = Modules.Parent local ToolEditor = {} ToolEditor.__index = ToolEditor function ToolEditor.new() local hDesc =...
2,320
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/ToolGripEditor/Plugin/init.server.lua
luau
.lua
------------------------------------------------------------------------------------------------------ -- @ CloneTrooper1019, 2019 -- Tool Grip Editor v2.0! ------------------------------------------------------------------------------------------------------ -- Setup -------------------------------------------------...
1,968
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Debug3D.lua
luau
.lua
local Debug3D = { Colors = { Red = Color3.new(1, 0, 0); Yellow = Color3.new(1, 1, 0); Green = Color3.new(0, 1, 0); Cyan = Color3.new(0, 1, 1); Blue = Color3.new(0, 0, 1); Pink = Color3.new(1, 0, 1); White = Color3.new(1, 1, 1); Black = Color3.new(0, 0, 0); } } local setPlayerGui = Inst...
1,273
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Materials.lua
luau
.lua
local Materials = { Missing = {}; Stub = { MISSING = true; Material = "Plastic"; Color = Color3.new(.7, .7, .7); }; } local ServerStorage = game:GetService("ServerStorage") local Linker = {} local Map = {} function Linker:__index(key) local link = rawget(self, "__link") local result local success,...
1,168
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/MockPlugin.lua
luau
.lua
local MockPlugin = {} MockPlugin.__index = MockPlugin local MockToolbar = {} MockToolbar.__index = MockToolbar local MockButton = {} MockButton.__index = MockButton local CollectionService = game:GetService("CollectionService") function MockPlugin.new() local deactivator = Instance.new("BindableEvent") local unlo...
715
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Plane.lua
luau
.lua
------------------------------------------------------------------------------------------------------------- local Plane = {} Plane.__index = Plane local function isFinite(num: number) return num == num and num ~= -1/0 and num ~= 1/0 end local function isVector3Finite(v3: Vector3) return isFinite(v3.X) and isFini...
506
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Polygon.lua
luau
.lua
local Polygon = {} Polygon.__index = Polygon local polyTemp = Instance.new("WedgePart") polyTemp.BottomSurface = 0 polyTemp.Anchored = true polyTemp.Name = "Poly" local abs = math.abs local min = math.min local pi = math.pi local MIN_SIZE = 0.05 local IDENTITY = Vector3.new() local BASE_ANGLE_1 = CFrame.Angles(pi,...
1,155
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Tree.lua
luau
.lua
local Tree = {} function Tree:GetItems() local children = rawget(self, "_children") return children or {} end function Tree:GetItemsOfType(itemType) local itemType = itemType:lower() local results = {} for _,item in pairs(self:GetItems()) do if tostring(item.type):lower() == itemType then table.insert(res...
469
MaximumADHD/Roblox-Plugins
MaximumADHD-Roblox-Plugins-dcf56ca/VMFImporter/Plugin/Modules/Winding.lua
luau
.lua
local Winding = {} Winding.__index = Winding local Debug3D = require(script.Parent.Debug3D) local debugMode = false local MAX_POINTS_ON_WINDING = 128 local SPLIT_EPSILON = 0.01 local ON_PLANE_EPSILON = 0.5 local ROUND_VERTEX_EPSILON = 0.01 local MIN_EDGE_LENGTH_EPSILON = 0.1 local MAX_COORD_INTEGER = 1024 local COO...
1,433
lisphm/A-Chassis
lisphm-A-Chassis-3533c32/Scripts/CustomEngine.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
807
lisphm/A-Chassis
lisphm-A-Chassis-3533c32/Scripts/MiscWeld.luau
luau
.luau
--[[ ___ _____ / _ |/ ___/ Avxnturador | Novena midmm5 | / __ / /__ LuaInt | Novena /_/ |_\___/ Detomiks | Base Chassis Version 1.7 *Credit ...
676
lisphm/A-Chassis
lisphm-A-Chassis-3533c32/Scripts/Plugins/Aerodynamics.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
1,848
lisphm/A-Chassis
lisphm-A-Chassis-3533c32/Scripts/Plugins/Controls.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
2,109
lisphm/A-Chassis
lisphm-A-Chassis-3533c32/Scripts/Plugins/GForces.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
1,093