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
arindam-codes/roblox-scripting-practices
arindam-codes-roblox-scripting-practices-8cbeb05/src/server/main.server.luau
luau
.luau
--[[ -- was understadning modulescripts local module = require(game.ReplicatedStorage.Shared.moduleScript) val = module.add(5, 3) print(val) ]]
37
arindam-codes/roblox-scripting-practices
arindam-codes-roblox-scripting-practices-8cbeb05/src/shared/moduleScript.luau
luau
.luau
--[[ local module = {} -- do something function module.add(a, b) return a + b end return module ]]
28
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/Color.luau
luau
.luau
--!optimize 2 --!native local sRGB = {} local function fromLinear(channel: number): number if channel < 0.0031308 then return channel * 12.92 else return channel ^ (1 / 2.4) * 1.055 - 0.055 end end local function toLinear(channel: number): number if channel < 0.04045 then return channel / 12.92 else ret...
1,131
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/DataType.luau
luau
.luau
--!optimize 2 --!native --!strict --!nolint LocalShadow local Package = script.Parent local Type = require(Package.Type) local Color = require(Package.Color) local Oklab = Color.Oklab local DataType = {} --- Packs an array of numbers into a given animatable data type function DataType.pack(numbers: { number }, typeS...
1,578
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/Interpolate.luau
luau
.luau
--!optimize 2 --!native local Color = require(script.Parent.Color) local Oklab = Color.Oklab local function Interpolate(a, b, t: number): any if typeof(a) == "number" then return math.lerp(a :: number, b :: number, t) elseif typeof(a) == "CFrame" then return a:Lerp(b, t) elseif typeof(a) == "Color3" then re...
928
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/Tween.luau
luau
.luau
local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local Interpolate = require(script.Parent.Interpolate) local State = require(script.Parent.State) local Type = require(script.Parent.Type) local Tween = {} Tween.__index = Tween local tweens = setmetatable({}, { __m...
525
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/Type.luau
luau
.luau
export type Function = (...any) -> ...any export type Dict<T> = { [T]: any } export type Set<T> = { [T]: boolean } export type Symbol = { type: "Symbol" } export type New<Name, Class> = (Name) -> (Class & Dict<any>) -> Class export type BaseConstructors = New<"Folder", Folder> & New<"BillboardGui", BillboardGui> & ...
522
kohltastrophe/flux
kohltastrophe-flux-72ffe43/src/init.luau
luau
.luau
local Color = require(script.Color) local Interpolate = require(script.Interpolate) local State = require(script.State) local Spring = require(script.Spring) local Tween = require(script.Tween) local Type = require(script.Type) --- A reactive state management library that makes it easy to create dynamic user interface...
1,534
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Hitboxes/init.luau
luau
.luau
--[[ Hey reader! If you've seen this branch then you'll see that this is a new file and is empty! I'm currently working on documentation first and then going to this, however I am debating whether we should take an object-oriented approach to this or functional The api would look something similar to this for OOP: ...
181
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Lifecycles/init.luau
luau
.luau
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Promise = require(script.Parent.Packages.Promise) local Logging = require(script.Parent.Logging) local FunctionLib = require(script.Parent.Util.FunctionLib) local Lifecycles = {} local CustomCycles = { Server = {}, Clie...
788
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Logging/init.luau
luau
.luau
--[=[ @class Log Created by railworks2, used with written permission. ]=] local RunService = game:GetService("RunService") local Promise = require(script.Parent.Packages.Promise) local Log = {} --[=[ @type LogLevel "INFO" | "DEBUG" | "WARN" | "ERROR" | "FATAL" @within Log ]=] type LogLevel = "INFO" | "DEBUG" | "W...
1,414
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Packages/Promise/init.luau
luau
.luau
-- fewkz/typed-luau-promise 2023 -- Generated by generate-promise.ts type PromiseStatus = "Started" | "Resolved" | "Rejected" | "Cancelled" type PromiseLike<T...> = { expect: (self: PromiseLike<T...>) -> T..., [any]: any } -- stylua: ignore start type PromiseExhausted = { andThen: <T2...>( self: PromiseLike<...any>,...
2,938
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Packages/why.luau
luau
.luau
--[[ WHY THIS? - Packages from pesde itself aren't great. So we put stuff here. Also the datastore manager we use is ProfileStore (changed from lapis) which isnt on a package manager. ]] return {}
48
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Player/PlayerClass.luau
luau
.luau
--!strict local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Promise = require(script.Parent.Parent.Packages.Promise) local Logging = require(script.Parent.Parent.Logging) local ProfileStore local Store = nil :: any --// Table local PlayerClass = {} PlayerClass.__index...
551
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Player/init.luau
luau
.luau
--!strict local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Network if RunService:IsServer() then Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].server) :: any else Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].client) :: any end local P...
903
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Sound/init.luau
luau
.luau
--!strict local RunService = game:GetService("RunService") local FunctionLib = require(script.Parent.Util.FunctionLib) local Network if RunService:IsServer() then Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].server) :: any else Network = require(script.Parent["_PRIVATE_HYDROGEN_network"].client) :: ...
682
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/Util/FunctionLib.luau
luau
.luau
--!strict local FunctionLib = {} local suffixes = { "K", "M", "B", "T", "Qd", "Qn", "Se", "Sp", "Oc", "No", "Dc", "Udc", "Ddc", "Tdc" } local None = newproxy(true) getmetatable(None :: any).__tostring = function() return "Sift.None" end function FunctionLib:ToSuffixString(n) if n == 0 then return "0" end for...
905
TeamHydrogen/Hydrogen
TeamHydrogen-Hydrogen-933f986/src/init.luau
luau
.luau
--!strict local RunService = game:GetService("RunService") --[[ Sophie B 2025 MIT ]] local Lifecycles = require(script.Lifecycles) local PossibleClientCycles = { "PlayerAdded", "PlayerRemoving", "Heartbeat", "CharacterAdded", "CharacterRemoving", "RenderStepped", "PostSimulation", } local PossibleServerCy...
700
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/LICENSE.luau
luau
.luau
--[[ MIT License Copyright (c) 2024 Redon Tech Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pub...
238
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/apis/client.luau
luau
.luau
--[[ _____ _ _______ _ | __ \ | | |__ __| | | | |__) | ___ __| | ___ _ __ | | ___ ___ | |__ | _ / / _ \ / _ | / _ \ | _ \ | | / _ \ / __| | _ \ | | \ \ | __/ | (_| | | ...
851
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/apis/server.luau
luau
.luau
--[[ _____ _ _______ _ | __ \ | | |__ __| | | | |__) | ___ __| | ___ _ __ | | ___ ___ | |__ | _ / / _ \ / _ | / _ \ | _ \ | | / _ \ / __| | _ \ | | \ \ | __/ | (_| | | ...
820
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/dev/client.client.luau
luau
.luau
local localPlayer = game.Players.LocalPlayer local ScreenGui = localPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui") local template = ScreenGui:WaitForChild("Frame"):WaitForChild("template") template.Visible = false for i, v in pairs(game.Teams:GetChildren()) do local clone = template:Clone() clone.Name = ...
129
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/dev/server.server.luau
luau
.luau
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player: Player, teamName: string) player.Team = game.Teams[teamName] player:LoadCharacter() end)
39
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/settings.luau
luau
.luau
--[[ _____ _ _______ _ | __ \ | | |__ __| | | | |__) | ___ __| | ___ _ __ | | ___ ___ | |__ | _ / / _ \ / _ | / _ \ | _ \ | | / _ \ / __| | _ \ | | \ \ | __/ | (_| | | ...
1,279
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/audio.luau
luau
.luau
-- Redon Tech Radio Systen local audio = {} audio.__index = audio function audio.new(main: { any }, assetId: string | boolean?, looped: boolean) local data = { main = main, sound = Instance.new("Sound"), isEnabled = typeof(assetId) == "string", } local self = setmetatable(data, audio) self.sound.SoundId = ...
167
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/components/message.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local shared = ReplicatedStorage:WaitForChild("radioShared") local Fusion = require(shared:WaitForChild("Fusion")) local util = require(shared:WaitForChild("util")) local New, Children = Fusion.New, Fusion.Children return function(props) local message: F...
1,279
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/components/messages.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local shared = ReplicatedStorage:WaitForChild("radioShared") local Fusion = require(shared:WaitForChild("Fusion")) local New, Children, OnEvent = Fusion.New, Fusion.Children, Fusion.OnEvent return function(props) local messages messages = New("Scrolling...
393
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/components/radioChannel.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local shared = ReplicatedStorage:WaitForChild("radioShared") local Fusion = require(shared:WaitForChild("Fusion")) local New, Children, Computed, OnEvent = Fusion.New, Fusion.Children, Fusion.Computed, Fusion.OnEvent return function(props) return New("Te...
430
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/components/radioChannels.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local shared = ReplicatedStorage:WaitForChild("radioShared") local Fusion = require(shared:WaitForChild("Fusion")) local New, Children, OnEvent = Fusion.New, Fusion.Children, Fusion.OnEvent return function(props) local frame: Frame? frame = New("Frame")...
402
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/components/radioTopbar.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local shared = ReplicatedStorage:WaitForChild("radioShared") local Fusion = require(shared:WaitForChild("Fusion")) local New, Children, OnEvent = Fusion.New, Fusion.Children, Fusion.OnEvent return function(props) return New("Frame")({ Name = "Topbar", ...
950
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/main.luau
luau
.luau
-- Redon Tech Radio System local main = {} main.__index = main local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local TextChatService = game:GetService("TextChatService") local localPlayer = Players....
5,300
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/client/runner.client.luau
luau
.luau
-- Redon Tech Radio System local main = script.Parent:WaitForChild("main") local success, result = pcall(function() return require(main).init() end) if not success then warn("[RTRS Client]: Client could not start\n", result, "\nTraceback:\n", debug.traceback()) end
69
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/init.server.luau
luau
.luau
--[[ _____ _ _______ _ | __ \ | | |__ __| | | | |__) | ___ __| | ___ _ __ | | ___ ___ | |__ | _ / / _ \ / _ | / _ \ | _ \ | | / _ \ / __| | _ \ | | \ \ | __/ | (_| | | ...
496
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/server/channel.luau
luau
.luau
-- Redon Tech Radio System type SystemMessage = { text: string, headerText: string?, backgroundColor3: Color3?, icon: string?, iconColor3: Color3?, iconRounded: boolean?, sideText: string?, sideAccent: Color3?, } local channel = {} channel.__index = channel local ReplicatedStorage = game:GetService("Replicat...
1,756
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/server/main.luau
luau
.luau
-- Redon Tech Radio System local main = {} main.__index = main local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local shared = ReplicatedStorage:WaitForChild("radioShared") local systemSettings = require(shared:WaitForChild("settings")) local comm = require(sh...
1,196
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/Spring.luau
luau
.luau
--!nonstrict --[[ Constructs a new computed state object, which follows the value of another state object using a spring simulation. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Types = require(Package.Types) local logError = require(Package.Logging.logError) local logErr...
1,550
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/Tween.luau
luau
.luau
--!nonstrict --[[ Constructs a new computed state object, which follows the value of another state object using a tween. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Types = require(Package.Types) local TweenScheduler = require(Package.Animation.TweenScheduler) local useD...
961
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/TweenScheduler.luau
luau
.luau
--!strict --[[ Manages batch updating of tween objects. ]] local RunService = game:GetService("RunService") local Package = script.Parent.Parent local Types = require(Package.Types) local lerpType = require(Package.Animation.lerpType) local getTweenRatio = require(Package.Animation.getTweenRatio) local updateAll = ...
464
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/getTweenRatio.luau
luau
.luau
--!strict --[[ Given a `tweenInfo` and `currentTime`, returns a ratio which can be used to tween between two values over time. ]] local TweenService = game:GetService("TweenService") local function getTweenRatio(tweenInfo: TweenInfo, currentTime: number): number local delay = tweenInfo.DelayTime local duration =...
247
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/lerpType.luau
luau
.luau
--!strict --[[ Linearly interpolates the given animatable types by a ratio. If the types are different or not animatable, then the first value will be returned for ratios below 0.5, and the second value for 0.5 and above. FIXME: This function uses a lot of redefinitions to suppress false positives from the Luau ...
1,518
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/packType.luau
luau
.luau
--!strict --[[ Packs an array of numbers into a given animatable data type. If the type is not animatable, nil will be returned. FUTURE: When Luau supports singleton types, those could be used in conjunction with intersection types to make this function fully statically type checkable. ]] local Package = script...
813
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/springCoefficients.luau
luau
.luau
--!strict --[[ Returns a 2x2 matrix of coefficients for a given time, damping and speed. Specifically, this returns four coefficients - posPos, posVel, velPos, and velVel - which can be multiplied with position and velocity like so: local newPosition = oldPosition * posPos + oldVelocity * posVel local newVelocit...
1,016
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Animation/unpackType.luau
luau
.luau
--!strict --[[ Unpacks an animatable type into an array of numbers. If the type is not animatable, an empty array will be returned. FIXME: This function uses a lot of redefinitions to suppress false positives from the Luau typechecker - ideally these wouldn't be required FUTURE: When Luau supports singleton typ...
731
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Dependencies/captureDependencies.luau
luau
.luau
--!strict --[[ Calls the given callback, and stores any used external dependencies. Arguments can be passed in after the callback. If the callback completed successfully, returns true and the returned value, otherwise returns false and the error thrown. The callback shouldn't yield or run asynchronously. NOTE: ...
361
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Dependencies/initDependency.luau
luau
.luau
--!strict --[[ Registers the creation of an object which can be used as a dependency. This is used to make sure objects don't capture dependencies originating from inside of themselves. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local sharedState = require(Package.Dependenc...
146
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Dependencies/sharedState.luau
luau
.luau
--!strict --[[ Stores shared state for dependency management functions. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) type Set<T> = {[T]: any} -- The set where used dependencies should be saved to. local dependencySet: Set<PubTypes.Dependency>? = nil -- A stack of sets where n...
125
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Dependencies/updateAll.luau
luau
.luau
--!strict --[[ Given a reactive object, updates all dependent reactive objects. Objects are only ever updated after all of their dependencies are updated, are only ever updated once, and won't be updated if their dependencies are unchanged. ]] local Package = script.Parent.Parent local PubTypes = require(Package....
449
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Dependencies/useDependency.luau
luau
.luau
--!strict --[[ If a target set was specified by captureDependencies(), this will add the given dependency to the target set. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local sharedState = require(Package.Dependencies.sharedState) local initialisedStack = sharedState.initiali...
168
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/Children.luau
luau
.luau
--!strict --[[ A special key for property tables, which parents any given descendants into an instance. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local logWarn = require(Package.Logging.logWarn) local Observer = require(Package.State.Observer) local xtypeof = require(Package...
1,010
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/Cleanup.luau
luau
.luau
--!strict --[[ A special key for property tables, which adds user-specified tasks to be run when the instance is destroyed. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Cleanup = {} Cleanup.type = "SpecialKey" Cleanup.kind = "Cleanup" Cleanup.stage = "observer" function...
106
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/Hydrate.luau
luau
.luau
--!strict --[[ Processes and returns an existing instance, with options for setting properties, event handlers and other attributes on the instance. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local applyInstanceProps = require(Package.Instances.applyInstanceProps) local func...
104
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/New.luau
luau
.luau
--!strict --[[ Constructs and returns a new instance, with options for setting properties, event handlers and other attributes on the instance right away. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local defaultProps = require(Package.Instances.defaultProps) local applyInstan...
203
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/OnChange.luau
luau
.luau
--!strict --[[ Constructs special keys for property tables which connect property change listeners to an instance. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local logError = require(Package.Logging.logError) local function OnChange(propertyName: string): PubTypes.SpecialKey...
225
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/OnEvent.luau
luau
.luau
--!strict --[[ Constructs special keys for property tables which connect event listeners to an instance. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local logError = require(Package.Logging.logError) local function getProperty_unsafe(instance: Instance, property: string) ret...
242
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/Out.luau
luau
.luau
--!strict --[[ A special key for property tables, which allows users to extract values from an instance into an automatically-updated Value object. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local logError = require(Package.Logging.logError) local xtypeof = require(Package.Ut...
286
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/Ref.luau
luau
.luau
--!strict --[[ A special key for property tables, which stores a reference to the instance in a user-provided Value object. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local logError = require(Package.Logging.logError) local xtypeof = require(Package.Utility.xtypeof) local Re...
177
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/applyInstanceProps.luau
luau
.luau
--!strict --[[ Applies a table of properties to an instance, including binding to any given state objects and applying any special keys. No strong reference is kept by default - special keys should take care not to accidentally hold strong references to instances forever. If a key is used twice, an error will b...
993
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Instances/defaultProps.luau
luau
.luau
--!strict --[[ Stores 'sensible default' properties to be applied to instances created by the New function. ]] return { ScreenGui = { ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling }, BillboardGui = { ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling }, SurfaceGui...
790
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Logging/logError.luau
luau
.luau
--!strict --[[ Utility function to log a Fusion-specific error. ]] local Package = script.Parent.Parent local Types = require(Package.Types) local messages = require(Package.Logging.messages) local function logError(messageID: string, errObj: Types.Error?, ...) local formatString: string if messages[messageID] ~...
221
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Logging/logErrorNonFatal.luau
luau
.luau
--!strict --[[ Utility function to log a Fusion-specific error, without halting execution. ]] local Package = script.Parent.Parent local Types = require(Package.Types) local messages = require(Package.Logging.messages) local function logErrorNonFatal(messageID: string, errObj: Types.Error?, ...) local formatString...
238
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Logging/logWarn.luau
luau
.luau
--!strict --[[ Utility function to log a Fusion-specific warning. ]] local Package = script.Parent.Parent local messages = require(Package.Logging.messages) local function logWarn(messageID, ...) local formatString: string if messages[messageID] ~= nil then formatString = messages[messageID] else messageID ...
118
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Logging/parseError.luau
luau
.luau
--!strict --[[ An xpcall() error handler to collect and parse useful information about errors, such as clean messages and stack traces. TODO: this should have a 'type' field for runtime type checking! ]] local Package = script.Parent.Parent local Types = require(Package.Types) local function parseError(err: stri...
122
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/PubTypes.luau
luau
.luau
--!strict --[[ Stores common public-facing type information for Fusion APIs. ]] type Set<T> = {[T]: any} --[[ General use types ]] -- A unique symbolic value. export type Symbol = { type: string, -- replace with "Symbol" when Luau supports singleton types name: string } -- Types that can be expressed as vector...
1,063
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/Computed.luau
luau
.luau
--!nonstrict --[[ Constructs and returns objects which can be used to model derived reactive state. ]] local Package = script.Parent.Parent local Types = require(Package.Types) local captureDependencies = require(Package.Dependencies.captureDependencies) local initDependency = require(Package.Dependencies.initDepen...
822
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/ForKeys.luau
luau
.luau
--!nonstrict --[[ Constructs a new ForKeys state object which maps keys of an array using a `processor` function. Optionally, a `destructor` function can be specified for cleaning up calculated keys. If omitted, the default cleanup function will be used instead. Optionally, a `meta` value can be returned in the...
1,962
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/ForPairs.luau
luau
.luau
--!nonstrict --[[ Constructs a new ForPairs object which maps pairs of a table using a `processor` function. Optionally, a `destructor` function can be specified for cleaning up values. If omitted, the default cleanup function will be used instead. Additionally, a `meta` table/value can optionally be returned t...
2,400
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/Observer.luau
luau
.luau
--!nonstrict --[[ Constructs a new state object which can listen for updates on another state object. FIXME: enabling strict types here causes free types to leak ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Types = require(Package.Types) local initDependency = require(P...
496
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/Value.luau
luau
.luau
--!nonstrict --[[ Constructs and returns objects which can be used to model independent reactive state. ]] local Package = script.Parent.Parent local Types = require(Package.Types) local useDependency = require(Package.Dependencies.useDependency) local initDependency = require(Package.Dependencies.initDependency) l...
390
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/State/unwrap.luau
luau
.luau
--!strict --[[ A common interface for accessing the values of state objects or constants. ]] local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local xtypeof = require(Package.Utility.xtypeof) local function unwrap<T>(item: PubTypes.CanBeState<T>, useDependency: boolean?): T return if ...
104
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Types.luau
luau
.luau
--!strict --[[ Stores common type information used internally. These types may be used internally so Fusion code can type-check, but should never be exposed to public users, as these definitions are fair game for breaking changes. ]] local Package = script.Parent local PubTypes = require(Package.PubTypes) type ...
1,104
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/None.luau
luau
.luau
--!strict --[[ A symbol for representing nil values in contexts where nil is not usable. ]] local Package = script.Parent.Parent local Types = require(Package.Types) return { type = "Symbol", name = "None" } :: Types.None
52
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/cleanup.luau
luau
.luau
--!strict --[[ Cleans up the tasks passed in as the arguments. A task can be any of the following: - an Instance - will be destroyed - an RBXScriptConnection - will be disconnected - a function - will be run - a table with a `Destroy` or `destroy` function - will be called - an array - `cleanup` will be called...
324
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/doNothing.luau
luau
.luau
--!strict --[[ An empty function. Often used as a destructor to indicate no destruction. ]] local function doNothing(...: any) end return doNothing
35
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/isSimilar.luau
luau
.luau
--!strict --[[ Returns true if A and B are 'similar' - i.e. any user of A would not need to recompute if it changed to B. ]] local function isSimilar(a: any, b: any): boolean -- HACK: because tables are mutable data structures, don't make assumptions -- about similarity from equality for now (see issue...
116
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/needsDestruction.luau
luau
.luau
--!strict --[[ Returns true if the given value is not automatically memory managed, and requires manual cleanup. ]] local function needsDestruction(x: any): boolean return typeof(x) == "Instance" end return needsDestruction
53
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/restrictRead.luau
luau
.luau
--!strict --[[ Restricts the reading of missing members for a table. ]] local Package = script.Parent.Parent local logError = require(Package.Logging.logError) type table = {[any]: any} local function restrictRead(tableName: string, strictTable: table): table -- FIXME: Typed Luau doesn't recognise this correctly ...
145
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/Utility/xtypeof.luau
luau
.luau
--!strict --[[ Extended typeof, designed for identifying custom objects. If given a table with a `type` string, returns that. Otherwise, returns `typeof()` the argument. ]] local function xtypeof(x: any) local typeString = typeof(x) if typeString == "table" and typeof(x.type) == "string" then return x.type e...
93
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/Fusion/init.luau
luau
.luau
--!strict --[[ The entry point for the Fusion library. ]] local PubTypes = require(script.PubTypes) local restrictRead = require(script.Utility.restrictRead) export type StateObject<T> = PubTypes.StateObject<T> export type CanBeState<T> = PubTypes.CanBeState<T> export type Symbol = PubTypes.Symbol export type Value...
780
Redon-Tech/radio-system
Redon-Tech-radio-system-b267e79/src/system/shared/util.luau
luau
.luau
local TextService = game:GetService("TextService") local util = {} -- Below function is basically copy and pasted from Roblox core scripts for the chat function util.getStringTextBounds(text, font, textSize, sizeBounds) sizeBounds = sizeBounds or Vector2.new(10000, 10000) return TextService:GetTextSize(text, textSiz...
182
hank-hail/CuteSignal
hank-hail-CuteSignal-77902c2/CuteSignal.luau
luau
.luau
--!strict --!native --[[ CuteSignal - Sync listeners fire immediately. - Async listeners run through a reusable coroutine runner. - Waiters suspend and resume on the next fire. ]] -- Type definitions type Callback = (...any) -> () export type Disconnect = () -> () type SignalCore = { Fire: (self: Signal, ...any...
2,739
daimond113/lexi
daimond113-lexi-5c1c385/pkgs/bin/src/dotenv.luau
luau
.luau
local fs = require('@lune/fs') local process = require('@lune/process') local serde = require('@lune/serde') local function dotenv() local success, content = pcall(fs.readFile, `{process.cwd}/.env`) if success and type(content) == 'string' then success, content = pcall(serde.decode, 'toml', content) if success...
137
daimond113/lexi
daimond113-lexi-5c1c385/pkgs/lib/scripts/ts.luau
luau
.luau
local fs = require('@lune/fs') pcall(fs.removeDir, 'dist') fs.copy('src', 'dist/lib') fs.writeDir('dist/roblox_packages') fs.writeFile( 'dist/roblox_packages/vide.luau', [[ local TS = _G[script.Parent.Parent.lib] return TS.import(script.Parent.Parent.lib, TS.getModule(script.Parent.Parent.lib, "@rbxts", "vide").src)...
94
daimond113/lexi
daimond113-lexi-5c1c385/pkgs/lib/src/init.luau
luau
.luau
local LocalizationService = game:GetService('LocalizationService') local Players = game:GetService('Players') local vide = require(script.Parent.roblox_packages.vide) local local_player = Players.LocalPlayer local player_locale_translator = vide.source(nil :: Translator?) if local_player then local function update_...
1,095
Conikku/ClassicHeadConversion
Conikku-ClassicHeadConversion-ab1740a/example.server.luau
luau
.luau
--[[ This is a server script. An example script that uses the module to convert all players faces into dynamic ones (if possible). ]] local Players = game:GetService("Players") -- Don't forget to require module from wherever you put it! local ClassicHeadConversion = require("@path/to/ClassicHeadConversion") local fu...
179
Conikku/ClassicHeadConversion
Conikku-ClassicHeadConversion-ab1740a/legacy/ConversionHandler.luau
luau
.luau
--[[ Author: @Conikku Start Date: August 15, 2023 Last Updated: November 19, 2023 Note: Credit Roblox user @Conikku if used. ]] local ConversionHandler = {} local FacesTable = require(script.FacesTable) -- Table for heads is in a seperate module to make it easier to edit and to make this script have less li...
1,275
Conikku/ClassicHeadConversion
Conikku-ClassicHeadConversion-ab1740a/legacy/FacesTable.luau
luau
.luau
--[[ Author: @Conikku Start Date: August 17, 2023 Last Updated: November 17, 2023 Note: List of faces for ConversionHandler inside of a module so that way ConversionHandler isn't too lengthy ]] local FacesTable = { ------------> Roblox Created Heads <------------ -- Stevie/Default Smile [13976201768] ...
3,581
Conikku/ClassicHeadConversion
Conikku-ClassicHeadConversion-ab1740a/legacy/init.luau
luau
.luau
--[[ Author: @Conikku Date: August 16, 2023 Place in ServerScriptStorage or Workspace Note: Credit Roblox user @Conikku if used. Will be updated when more dynamic faces are made, module will auto update live in servers so be aware it could break stuff depending on how you coded it. If you are modifying it yo...
381
Levnth/Modula
Levnth-Modula-9142035/modula/init.luau
luau
.luau
--!strict -- [Dependencies] local Promise = require(script.Parent["typed-promise"]) local Modula = {} -- [Types] export type ModulaType = typeof(Modula) type PredicateFn = (Module: ModuleScript) -> boolean type DirectoryType = {[number]: ModuleScript | Instance} type DepthType = "Children" | "Descendants" ...
860
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/InstanceQuery.luau
luau
.luau
--!strict --!optimize 2 local InstanceQuery = {} type QueryPath = {string} function InstanceQuery:GetAsync(parent: Instance, query_path: QueryPath): any local query_result = parent for _, path in query_path do query_result = query_result:WaitForChild(path) end return query_result end function InstanceQuery:Ge...
138
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/RagdollBuilder.luau
luau
.luau
--!strict local RagdollBuilder = {} local Util = require(script.Parent.Util) local Types = require(script.Parent.Types) local RigConfigs = require(script.Parent.RigConfigs) local InstanceQuery = require(script.Parent.InstanceQuery) type RigConfig = Types.RigConfig type CharacterRagdollInfo = Types.CharacterRagdollIn...
1,391
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/RigConfigs/R15.luau
luau
.luau
--!strict local Types = require(script.Parent.Parent.Types) type SocketLimits = Types.SocketLimits local NECK_LIMITS: SocketLimits = {MaxFrictionTorque = 55, UpperAngle = 15, TwistLowerAngle = -25, TwistUpperAngle = 25} local WAIST_LIMITS: SocketLimits = {MaxFrictionTorque = 25, UpperAngle = 40, TwistLowerAngle = -45...
1,485
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/RigConfigs/R6.luau
luau
.luau
--!strict local Types = require(script.Parent.Parent.Types) type SocketLimits = Types.SocketLimits local NECK_LIMITS: SocketLimits = {MaxFrictionTorque = 10, UpperAngle = 30, TwistLowerAngle = -60, TwistUpperAngle = 60} local SHOULDER_LIMITS: SocketLimits = {MaxFrictionTorque = 10, UpperAngle = 90, TwistLowerAngle = ...
528
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/RigConfigs/init.luau
luau
.luau
--!strict local Types = require(script.Parent.Types) local RigConfigs = {} :: {[string]: Types.RigConfig} for _, v in script:GetChildren() do RigConfigs[v.Name] = require(v) :: any end return RigConfigs
55
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/Types.luau
luau
.luau
--!strict export type SavedTracks = {{Track: AnimationTrack, Speed: number, TimePosition: number}} export type CharacterRagdollInfo = { Ragdolled: boolean, Character: Model, RigType: string, Animator: Animator?, Humanoid: Humanoid?, RootPart: BasePart?, Limbs: {[string]: BasePart}, Joints: {[string]: Motor6D},...
369
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/Util.luau
luau
.luau
--!strict local Util = {} local Types = require(script.Parent.Types) local InstanceQuery = require(script.Parent.InstanceQuery) local DEFAULT_MAX_FRICTION_TORQUE = 20 local IsStudio = game:GetService("RunService"):IsStudio() type SavedTracks = Types.SavedTracks type CharacterRagdollInfo = Types.CharacterRagdollInfo...
976
Brawldude2/RagdollService
Brawldude2-RagdollService-2556f67/src/init.luau
luau
.luau
--!strict --!optimize 2 local RagdollService = {} local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Util = require(script.Util) local Types = require(script.Types) local RigConfigs = require(script.RigConfigs) local RagdollBuilder = require(script.RagdollBuilder) loca...
2,274
TumbleWede/Val
TumbleWede-Val-f495dab/test.server.luau
luau
.luau
--!strict local TestEZ = require(script.Parent.TestEZ) :: any TestEZ.TestBootstrap:run {script} -- Test type annotations local Val = require(script.Val) local x = Val.new(2) local z = Val.new("Str") local y = Val.calc(function(get) return get(x) .. get(z) end) x:on(function(value, old, wasCalledImmediately) local...
112
TumbleWede/Val
TumbleWede-Val-f495dab/testez.d.lua
luau
.lua
export type Expectation = { to: Expectation, be: Expectation, been: Expectation, have: Expectation, was: Expectation, at: Expectation, never: Expectation, a: (typeName: string?) -> Expectation, an: (typeName: string?) -> Expectation, ok: () -> Expectation, throw: (message: string?) -> Expectation, near: (go...
306
TheNexusAvenger/Nexus-VR-Backpack
TheNexusAvenger-Nexus-VR-Backpack-2f19c89/place/ServerScriptService/MainModule.luau
luau
.luau
--[[ TheNexusAvenger Loader for Nexus VR Backpack. --]] --!strict local ReplicatedStorage = game:GetService("ReplicatedStorage") return function() --Copy NexusVRBackpack to ReplicatedStorage if it doesn't exist already. --Client setup is up to Nexus VR Character Model or the game creator. if Replicated...
110
TheNexusAvenger/Nexus-VR-Backpack
TheNexusAvenger-Nexus-VR-Backpack-2f19c89/place/ServerScriptService/TestLoader.server.luau
luau
.luau
--[[ TheNexusAvenger Loads Nexus VR Backpack on the server for testing. --]] local TOTAL_TEST_TOOLS = 9 local ServerScriptService = game:GetService("ServerScriptService") local StarterPack = game:GetService("StarterPack") local HttpService = game:GetService("HttpService") --Create the test tools. for i = 1, TOTAL...
235