repo
stringclasses
341 values
file_path
stringlengths
29
173
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.66M
tokens
int64
2
598k
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/hooks/utilities/use-device-platform.ts
roblox-ts
.ts
//!optimize 2 import useForcedPlatform from "../contexts/use-forced-platform"; import { type Binding, useBinding } from "@rbxts/react"; import { useEventConnection } from "@rbxts/react-hooks"; import { UserInputService } from "@rbxts/services"; import type DevicePlatform from "shared/modules/meta/device-platform"; imp...
262
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/hooks/utilities/use-scale-platform.ts
roblox-ts
.ts
//!optimize 2 import useDevicePlatform from "./use-device-platform"; import { type Binding, joinBindings } from "@rbxts/react"; import { useViewportSize } from "@rbxts/react-hooks"; import { GuiService } from "@rbxts/services"; import DevicePlatform from "shared/modules/meta/device-platform"; const [TOP_LEFT, BOTTOM_...
244
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/hooks/utilities/use-standard-scale.ts
roblox-ts
.ts
//!optimize 2 import useScalePlatform from "./use-scale-platform"; import type { Binding } from "@rbxts/react"; import DevicePlatform from "shared/modules/meta/device-platform"; export type ModifyWith = { readonly [devicePlatform in DevicePlatform]?: number }; export default function useStandardScale(modifyWith?: Mo...
145
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/log-config.ts
roblox-ts
.ts
import type { LogConfig } from "@rbxts/rbxts-sleitnick-log"; const logConfiguration: LogConfig = { Default: "Warning", Development: { Client: "Warning", PlaceIds: [], Server: "Warning", }, Studio: "Debug", }; export = logConfiguration;
70
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/packages/react-error-boundary/assert-error-boundary-context.ts
roblox-ts
.ts
//!optimize 2 import type { ErrorBoundaryContextType } from "./error-boundary-context"; import { t } from "@rbxts/t"; const isErrorBoundaryContext = t.interface({ didCatch: t.boolean, resetErrorBoundary: t.callback, }) as t.check<ErrorBoundaryContextType>; export function assertErrorBoundaryContext(value: unknown)...
103
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/packages/react-error-boundary/error-boundary-context.ts
roblox-ts
.ts
//!optimize 2 import React from "@rbxts/react"; export interface ErrorBoundaryContextType { readonly didCatch: boolean; readonly error: unknown; readonly resetErrorBoundary: Callback; } export const ErrorBoundaryContext = React.createContext<ErrorBoundaryContextType | undefined>(undefined); export default ErrorBo...
68
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/packages/react-error-boundary/is-valid-element.luau
luau
.luau
--!optimize 2 --!strict return function(object: any) return type(object) == "table" and object["$$typeof"] == 0xeac7 end
39
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/packages/react-error-boundary/packages.ts
roblox-ts
.ts
//!optimize 2 /* eslint-disable unicorn/prefer-export-from */ import LuauPolyfill from "@rbxts/luau-polyfill"; import ReactPackage from "@rbxts/react"; export const React = ReactPackage; export { LuauPolyfill };
55
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/promises/catch-factory.luau
luau
.luau
--!optimize 2 local ReplicatedStorage = game:GetService("ReplicatedStorage") local TS = require(ReplicatedStorage:WaitForChild("rbxts_include"):WaitForChild("RuntimeLib")) local Log = TS.import( script, ReplicatedStorage, "rbxts_include", "node_modules", "@rbxts", "rbxts-sleitnick-log", "out" ).default local l...
312
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/promises/promise-plus/promise-all.luau
luau
.luau
--!nonstrict --!optimize 2 local ReplicatedStorage = game:GetService("ReplicatedStorage") local TS = require(ReplicatedStorage:WaitForChild("rbxts_include"):WaitForChild("RuntimeLib")) return TS.Promise.all
54
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/promises/promise-plus/promise-from-event.luau
luau
.luau
--!nonstrict --!optimize 2 local ReplicatedStorage = game:GetService("ReplicatedStorage") local TS = require(ReplicatedStorage:WaitForChild("rbxts_include"):WaitForChild("RuntimeLib")) local Promise = TS.Promise local function Pack(...) return {...} end local function disconnectIt(connection) if type(connection) =...
506
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/promises/promise-plus/tap-with-catch.luau
luau
.luau
--!nonstrict --!optimize 2 local ReplicatedStorage = game:GetService("ReplicatedStorage") local TS = require(ReplicatedStorage:WaitForChild("rbxts_include"):WaitForChild("RuntimeLib")) local Promise = TS.Promise local ERROR_NON_FUNCTION = "Please pass a handler function to %*!" local function isCallable(value) if t...
415
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/utilities/device-utilities.ts
roblox-ts
.ts
//!optimize 2 import DevicePlatform from "../meta/device-platform"; import { GuiService, UserInputService, Workspace } from "@rbxts/services"; const [TOP_LEFT, BOTTOM_RIGHT] = GuiService.GetGuiInset(); export function getViewportSize(): Vector2 { const currentCamera = Workspace.CurrentCamera; return currentCamera?...
232
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/utilities/is-truly-studio.ts
roblox-ts
.ts
/// <reference types="@rbxts/types/plugin" /> //!optimize 2 import { RunService } from "@rbxts/services"; function getNetworkClient(): NetworkClient | undefined { return game.FindService("NetworkClient") as NetworkClient | undefined; } function getClientReplicator(networkClient: NetworkClient): ClientReplicator | un...
212
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/utilities/memoize.ts
roblox-ts
.ts
//!native //!optimize 2 import { LFUCache, LRUCache } from "@rbxts/data-structures"; export function memoize<T, U>(memoizeFunction: (index: T) => U): (index: T) => U { const cache = new Map<T, U>(); function memoized(index: T): U { const cached = cache.get(index); if (cached !== undefined) return cached; co...
337
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/modules/utilities/react/bindings.ts
roblox-ts
.ts
//!optimize 2 import { stableLerp } from "../primitives/number-utilities"; import { type Binding, createBinding, joinBindings } from "@rbxts/react"; import type { BindingOrValue } from "types/react-types"; export interface BindingApi<T> { readonly getValue: () => T; readonly subscribe: (callback: (newValue: T) => v...
1,290
howmanysmall/modern-roblox-ts-template
howmanysmall-modern-roblox-ts-template-8515fd5/src/shared/shared-stories.storybook.ts
roblox-ts
.ts
//!optimize 2 import type { Storybook } from "@rbxts/ui-labs"; const SharedStorybook: Storybook = { groupRoots: true, name: "Shared", storyRoots: [script.Parent!.FindFirstChild("__stories__")!], }; export = SharedStorybook;
64
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/scripts/cloud_entry.luau
luau
.luau
-- darklua bundles this whole require graph into the one script string the -- create-task api accepts, which is why the specs reach the engine without a -- place upload local run = require("@tests/roblox/run") local passed, failed, report = run() print(report) -- a failing suite has to fail the TASK, not just print....
123
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/camera_shake.luau
luau
.luau
local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Shake = require("@pkg/Shake") local activeShakes = {} local totalShakeCF = CFrame.identity local function up...
1,261
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/mesh.luau
luau
.luau
--!nolint LocalShadow local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local flipbook_common = require("@mod/common/flipbook") local Oklab = require("@mod/color/Okla...
3,421
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/particle.luau
luau
.luau
local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local particle = {} function particle.emit(ref: ParticleEmitter, obj: ParticleEmitter, scope: types.scope) if ref.Enabled then ref.Enabled = false end loc...
456
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/randomizer.luau
luau
.luau
local attr = require("@mod/attributes") local lerp = require("@mod/lerp") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Bezier = require("@obj/Bezier") local rng = Random.new() local randomizer = {} local function getBezier(params: string): B...
580
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/screen.luau
luau
.luau
local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local types = require("@root/types") local utility = require("@mod/utility") local screen = {} function screen.emit(ref: BasePart, scope: types.scope) if not ref:GetAttribute("Enabled") then return end local scale = a...
468
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/sound.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Promise = require("@pkg/Promise") local rng = ...
1,913
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/spin.luau
luau
.luau
local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local spin = {} function spin.emit(ref: Model, scope: types.scope) if utility.isSpinModelStatic(ref) then return end local rotation = attr.get(ref, "SpinR...
672
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/tweener.luau
luau
.luau
local attr = require("@mod/attributes") local lerp = require("@mod/lerp") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local rng = Random.new() local tweener = {} function tweener.emit(obj: RayValue, scope: types.scope, isAttribute: boolean) local...
729
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/emitters.luau
luau
.luau
local Beam = require("@vfx/beam") local Spin = require("@vfx/spin") local Mesh = require("@vfx/mesh") local Sound = require("@vfx/sound") local Bezier = require("@vfx/bezier") local Screen = require("@vfx/screen") local Particle = require("@vfx/particle") local Lightning = require("@vfx/lightning") local CameraShake = ...
2,925
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/attributes.luau
luau
.luau
local RunService = game:GetService("RunService") local logger = require("./logger") local IS_SERVER = RunService:IsServer() local ATTR_CACHE_ID = "U" type AttrCache = { [number]: { [string]: any, }, } type AttrHooks = { [Instance]: { [string]: { (v: any) -> never }, }, } type RuntimeState = { [In...
1,214
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/common/flipbook.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local common = {} function common.serialize(ids: { number }) local buf = buffer.create(#ids * 8) for i, id in ids do buffer.writef64(buf, (i - 1) * 8, id) end return buf end function common.d...
545
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/common/path.luau
luau
.luau
-- Pure Path2D control-point (de)serialization + curve sampling. No engine -- access (no `game`/`script`) so this is requirable under lune as well as in -- Studio -- unlike `@mod/utility`, which does top-level `game:GetService`. -- -- `serializePath`/`deserializePath` are moved verbatim from `mod/utility.luau` -- (whic...
1,057
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/logger.luau
luau
.luau
local function msg(...: string) return `[Forge Emit API]: {table.concat({ ... }, " ")}` end local logger = {} function logger.error(...) error(msg(..., "\n")) end function logger.warn(...) warn(msg(...)) warn(msg(debug.traceback("stack trace:"))) end function logger.info(...) print(msg(...)) end return l...
80
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifier_codec.luau
luau
.luau
local value = require("./value") local codec = {} local VERSION = 1 -- fields the schema names explicitly; anything else on a modifier goes to -- `extra`, so a field written by a newer plugin survives a round trip here local KNOWN = { kind = true, chain = true, duration = true, start = true, finish = true,...
1,384
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifier_frame.luau
luau
.luau
local modifier_frame = {} -- frames an encoded modifier queue as "v1:" .. base64(body), matching -- model_serializer's convention that attributes hold strings, not buffers modifier_frame.PREFIX = "v1:" -- the flag is not a version: both forms are current and the writer picks per -- payload, because zstd roughly halve...
1,104
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifiers.luau
luau
.luau
-- Runtime evaluator for a per-target modifier queue. A modifier is -- lerp(start, finish, alpha); tween alpha = curve(progress), randomizer -- alpha = weighted random via `rng`. `chain` feeds the previous modifier's -- output into the next modifier's start. Unknown kinds pass their `start` -- value through unchanged (...
610
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/recolor.luau
luau
.luau
local colorProps = { Single = { Color3 = { "Decal", "Texture", }, Color = { "Part", "Union", "MeshPart", "SpotLight", "PointLight", "SurfaceLight", "SurfaceAppearance", }, }, Sequence = { Color = { "Beam", "Trail", "Pa...
854
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/resize.luau
luau
.luau
local utility = require("@mod/utility") local resize = {} function resize.apply(obj: Instance, factor: number) if obj:IsA("ParticleEmitter") then obj.Size = utility.scaleNumberSequence(obj.Size, factor) obj.Speed = NumberRange.new(obj.Speed.Min * factor, obj.Speed.Max * factor) obj.Acceleration *= facto...
814
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/shape.luau
luau
.luau
--!native --!optimize 2 local utility = require("@mod/utility") local shape = {} function shape.getSurfaceCFrame(cf: CFrame, n: Vector3, pos: Vector3) local up = math.abs(n:Dot(Vector3.yAxis)) > 0.99 and Vector3.zAxis or Vector3.yAxis local rot = CFrame.lookAt(Vector3.zero, n, up) return cf * CFrame.new(pos) * ...
1,586
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/tween.luau
luau
.luau
local RunService = game:GetService("RunService") local logger = require("@mod/logger") local utility = require("@mod/utility") local Bezier = require("@obj/Bezier") local tween = {} tween.bezier_cache = {} :: { [string]: Bezier.Bezier } function tween.fromParams( params: string, duration: number, animator: (...
887
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/utility.luau
luau
.luau
--!native --!nolint LocalShadow local RunService = game:GetService("RunService") local PhysicsService = game:GetService("PhysicsService") local attr = require("@mod/attributes") local logger = require("@mod/logger") local Promise = require("@pkg/Promise") local path = require("@mod/common/path") local utility = {} ...
4,856
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/value.luau
luau
.luau
-- a modifier value is a tagged union so a future dynamic variable slots in -- with no format change; only lit is produced in spec 1, var round-trips -- already export type Value = { t: "lit", v: any } | { t: "var", ref: string } local value = {} function value.lit(v: any): Value return { t = "lit", v = v } end fu...
172
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/obj/Bezier.luau
luau
.luau
--!native --!nocheck --!optimize 2 type n = vector | number local EASE_LUT_SIZE = 64 local NEWTON_MIN_TOL = 0.001 local NEWTON_MAX_ITER = 5 local function cubicBezier(p0: n, p1: n, p2: n, p3: n, t: n): n -- stylua: ignore return (1-t)^3*p0+3*(1-t)^2*t*p1+3*(1-t)*t^2*p2+t^3*p3 end local function cubicBezierDeriv...
1,803
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/obj/ObjectCache.luau
luau
.luau
local utility = require("@mod/utility") local RECYCLE_INTERVAL = 15 local cache = {} cache.__index = cache type item = { key: any, value: Instance, added: number, dependents: number, } type params = { size: number?, excess_lifetime: number?, on_free: ((item) -> ())?, } export type ObjectCache = type...
1,379
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/schema.luau
luau
.luau
-- Open, versioned schema standard for property/attribute rows. Data-only so it -- round-trips across the plugin<->runtime boundary and can be authored by custom -- effects. Unknown fields are preserved (validation never mutates the descriptor). -- An entry is a row (has `name`) or a group (has `title` + ordered `entri...
1,573
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/caches.luau
luau
.luau
local ObjectCache = require("@obj/ObjectCache") local utility = require("@mod/utility") local caches = {} function caches.init(scope: { any }) local shared_part_cache do local template = Instance.new("Part") template.Transparency = 1 template.Anchored = true template.CanCollide = false templ...
325
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/effects.luau
luau
.luau
local types = require("@root/types") local logger = require("@mod/logger") local utility = require("@mod/utility") local emitters = require("@root/emitters") local Promise = require("@pkg/Promise") local EffectSelectors = table.concat({ "Beam", "Trail", "Sound", "ParticleEmitter", -- Beziers `.{utility.B...
1,553
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/enabled_effects.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local attr = require("@mod/attributes") local types = require("@root/types") local utility = require("@mod/utility") local emitters = require("@root/emitters") local enabled_effects = {} function enabled_e...
902
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/texture_loader.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local ObjectCache = require("@obj/ObjectCache") local types = require("@root/types") local utility = require("@mod/utility") local flipbook_common = require("@mod/common/flipbook") local texture_loader = {} function texture_loader.init(scope: types.scop...
990
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/types.luau
luau
.luau
local Promise = require("@pkg/Promise") local ObjectCache = require("@obj/ObjectCache") export type scope = { any } & { depth: number, effects: EffectsService, _context: { _promises: { any } }?, _onCancel: { () -> () }?, } export type EmitEnv = { Finished: typeof(Promise.resolve()), Clear: (self: EmitEnv)...
351
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/harness.luau
luau
.luau
local roblox = require("@lune/roblox") :: any -- assigned bare rather than into a table, because lune propagates bare globals -- into plainly required chunks. that is what lets modules under test and the -- vendored Z see Color3 with no environment plumbing -- this project's roblox.yml std (the stock generated Roblox ...
1,345
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/roblox/run.luau
luau
.luau
local specs = { require("./modifier_frame.spec"), require("./modifier_codec.spec"), } return function() local passed = 0 local failed = 0 local lines = {} for _, spec in specs do for _, case in spec do local ok, err = pcall(case.run) if ok then passed += 1 table.insert(lin...
166
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/run.luau
luau
.luau
local process = require("@lune/process") local harness = require("@tests/harness") require("@tests/schema.spec") require("@tests/schema_curves.spec") require("@tests/modifiers_eval.spec") require("@tests/value.spec") require("@tests/modifier_codec.spec") require("@tests/modifier_frame.spec") process.exit(harness.run(...
68
malice-nz/RealConsole
malice-nz-RealConsole-70b0321/main.luau
luau
.luau
--!optimize 2 --# RealConsole --? Spice up your developer console! --* malice.nz local cloneref = cloneref or function(v) return v end; --# Thread Identity #-- local setthreadidentity = setthreadidentity or setidentity or setthreadcontext; local getthreadidentity = getthreadidentity or getidentity or getthreadcontex...
3,197
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
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Constants.luau
luau
.luau
return { VERSION = "5.8.0", TaggedProperties = { --[["RunContext",]] "Enabled", "Name", "ClassName" }, EditorsEnabled = true, ExplorerFrameNameFormat = "f_%s", ExplorerFrameScriptClassNameFormat = "s_%s", UnsavedTokenTag = "DontSaveToken", DefaultTokenTag = "Default", InsertScopeFormat = "Insert:%s", Poin...
107
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/ContextMenuEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local main = script.Parent.Parent local shared = main.Shared local PluginUI = require(shared.PluginUI) local RawInst = require(shared.Small.RawInst) local UITemplates = require(shared.UITemplates) local ItemGroup = require(shared.Vendo...
2,674
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/InstanceVisibilityEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local ReflectionService = game:GetService("ReflectionService") local HttpService = game:GetService("HttpService") local main = script.Parent.Parent local shared = main.Shared local UITemplates = require(shared.UITemplates) local PluginUI...
1,222
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/JextensionEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local main = script.Parent.Parent local shared = main.Shared local PluginUI = require(shared.PluginUI) local RawInst = require(shared.Small.RawInst) local UITemplates = require(shared.UITemplates) local ItemGroup = require(shared.Vendo...
753
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/OrderEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local RunService = game:GetService("RunService") local main = script.Parent.Parent local shared = main.Shared local UITemplates = require(shared.UITemplates) local Types = require(main.Types) local JDF = require(shared.UDF) local Plu...
1,578
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrame.luau
luau
.luau
--!strict --!optimize 2 local InstanceRecord = require("../../Shared/Small/InstanceRecord") local main = script.Parent.Parent.Parent local shared = main.Shared local PluginUI = require(shared.PluginUI) local RawInst = require(shared.Small.RawInst) local rawindex = RawInst.rawindex local Types = require(main.Types)...
536
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/Color3.luau
luau
.luau
--!strict --!optimize 2 local StudioService = game:GetService("StudioService") local PropertyFrame = require("../PropertyFrame") local xyz = require("../../../Shared/Small/xyz") local ColorPicker = require("../../../Shared/Vendor/PluginColorPicker") local PluginUI = PropertyFrame.PluginUI local RawInst = PropertyFra...
834
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/ContentId.luau
luau
.luau
--!strict --!optimize 2 local StudioService = game:GetService("StudioService") local PropertyFrame = require("../PropertyFrame") local PluginUI = PropertyFrame.PluginUI local RawInst = require("../../../Shared/Small/RawInst") return PropertyFrame.create( "ContentId", function(info, list, item, initValue) local u...
440
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/Enum.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local getClampedXY = require("../../../Shared/Small/GetClampedXY") local RawInst = require("../../../Shared/Small/RawInst") return PropertyFrame.create( "Enum", function(info, list, item, initValue) local editorFrame = info.PropertyEditor.W...
465
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/Instance.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local PropertyFrame = require("../PropertyFrame") local PluginUI = PropertyFrame.PluginUI return PropertyFrame.create( "Instance", function(info, list, item, initValue) local PropertyEditor, Manager = info.PropertyEditor, info.Manag...
422
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/Vector3.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local xyz = require("../../../Shared/Small/xyz") local PluginUI = PropertyFrame.PluginUI local RawInst = PropertyFrame.RawInst return PropertyFrame.create( "Vector3", function(info, list, item, initValue) local axisToUi = {} local items: ...
1,025
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/bool.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local RawInst = PropertyFrame.RawInst return PropertyFrame.create( "string", function(info, list, item, initValue) local box = PropertyFrame.PluginUI.createCheckBox(list, item.name, initValue) return box, { box = box } end, functi...
237
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/double_float.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local RawInst = PropertyFrame.RawInst return PropertyFrame.create( "number", function(info, list, item, initValue) local box = PropertyFrame.PluginUI.createAttributeBox(list, item.name, string.format("%.3f", initValue)) return box, { ...
261
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/int8_int16_int64_int32_int.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local RawInst = PropertyFrame.RawInst return PropertyFrame.create( "number", function(info, list, item, initValue) local box = PropertyFrame.PluginUI.createAttributeBox(list, item.name, initValue) return box, { box = box } end, fu...
248
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/PropertyFrames/string.luau
luau
.luau
--!strict --!optimize 2 local PropertyFrame = require("../PropertyFrame") local RawInst = PropertyFrame.RawInst return PropertyFrame.create( "string", function(info, list, item, initValue) local box = PropertyFrame.PluginUI.createAttributeBox(list, item.name, initValue) return box, { box = box } end, fu...
238
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/PropertyEditor/init.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local ReflectionService = game:GetService("ReflectionService") local ChangeHistoryService = game:GetService("ChangeHistoryService") local main = script.Parent.Parent local shared = main.Shared local UITemplates = require(shared.UITemp...
3,907
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/SettingEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local main = script.Parent.Parent local shared = main.Shared local UITemplates = require(shared.UITemplates) local Types = require(main.Types) local PluginUI = require(shared.PluginUI) local Style = require(shared.Style) local DefaultSe...
840
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/StateEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local main = script.Parent.Parent local shared = main.Shared local PluginUI = require(shared.PluginUI) local UITemplates = require(shared.UITemplates) local ItemGroup = require(shared.Vendor.ItemGroup) local SavedState = require(shared...
2,395
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Editors/StyleEditor.luau
luau
.luau
--!strict --!optimize 2 local plugin = script:FindFirstAncestorOfClass("Plugin") local StudioService = game:GetService('StudioService') local main = script.Parent.Parent local shared = main.Shared local UITemplates = require(shared.UITemplates) local Types = require(main.Types) local PluginUI = require(shared.Plu...
5,038
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/ClassSelectionMenu.luau
luau
.luau
--!strict local ChangeHistoryService = game:GetService("ChangeHistoryService") local Types = require("../Types") local ClassIcon = require("./Small/ClassIcon") local RawInst = require("./Small/RawInst") local Categories = require("./Info/InstanceCategories") local getClampedXY = require("./Small/GetClampedXY") loca...
3,179
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Create/ClassProps.luau
luau
.luau
type Source<T> = (() -> (T)) & ((newValue: T) -> ()) type V<T> = T--T | Source<T> -- Base Instance type type Instance = { Name: V<string>, ClassName: V<string>, Archivable: V<boolean>, Parent: V<Instance?>, [number]: any, } -- GuiBase2d - Base for all 2D UI elements type GuiBase2d = Instance & { AbsolutePositio...
2,658
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Create/init.luau
luau
.luau
local Props = require(script.ClassProps) type Create<Name, PropsType, Type> = (Name) -> (PropsType) -> (Type) type Create_Overloaded = & Create<"Frame", Props.Frame, Frame> & Create<"ScrollingFrame", Props.ScrollingFrame, ScrollingFrame> & Create<"TextLabel", Props.TextLabel, TextLabel> & Create<"TextButton", Props....
1,196
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/CreateOptionsDropdown.luau
luau
.luau
--!strict local plugin = script:FindFirstAncestorOfClass("Plugin") local VersionControl = require("../Editors/VersionControl") local StyleEditor = require("../Editors/StyleEditor") local SettingEditor = require("../Editors/SettingEditor") local OrderEditor = require("../Editors/OrderEditor") local InstanceVisibilityE...
1,655
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Defaults/DefaultInvisibleClasses.luau
luau
.luau
local studioSetting = settings().Studio local pluginDebugServiceEnabled = studioSetting.PluginDebuggingEnabled return { if pluginDebugServiceEnabled then nil else "PluginDebugService", "VirtualInputManager", "InstanceFileSyncService", "AdService", "InstanceExtensionsService", "MicroProfilerService", "Moderation...
627
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Defaults/DefaultOrder.luau
luau
.luau
--!strict local Types = require("../../Types") return function(manager: Types.Manager) return { "Workspace", "Players", "CoreGui", "Lighting", "MaterialService", "NetworkClient", "PluginGuiService", "ReplicatedFirst", "ReplicatedStorage", "ServerScriptService", "ServerStorage", "StarterGui", ...
444
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Defaults/DefaultSettings.luau
luau
.luau
--!strict local Types = require(script.Parent.Parent.Parent.Types) local Style = require(script.Parent.Parent.Style) local DefaultStyle = require("./DefaultStyle") local var = Style.var return { Display = { ShowTabBar = { Type = "boolean", Display = "Show Tab Bar", Default = true, OnChange = function(m...
1,722
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Defaults/DefaultStyle.luau
luau
.luau
--!strict local Style = require("../Style") local Selector = require("../Small/Selector") local ClassIcon = require("../Small/ClassIcon") local Types = require("../../Types") local InstClasses = require("../Info/InstClasses") local Constants = require("../../Constants") local rule = Style.rule local var = Style.var l...
8,441
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/ExplorerFrame.luau
luau
.luau
--!strict --!optimize 2 local ScriptEditorService = game:GetService("ScriptEditorService") local Types = require("../Types") local Jecs = require("../Jecs") local RawInst = require("./Small/RawInst") local UITemplates = require("./UITemplates") local Selector = require("./Small/Selector") local ClassIcon = require("....
10,376
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/GitAPI/APIResult.luau
luau
.luau
export type APIResult<T... = ()> = { Code: number, Message: string, Success: boolean, Unwrap: (APIResult<T...>) -> T... } local resultIndex = {} local resultMt = { __index = resultIndex, __metatable = "Metatable is locked" } function resultMt:__tostring() return `APIResult({self.Success})` end function result...
241
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/GitAPI/Base64.luau
luau
.luau
local endchars = { '', '==', '=' } local function to_base64(data: string): string -- (XDeltaXen) - https://devforum.roblox.com/t/base64-encoding-and-decoding-in-lua/1719860 local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' return ((data:gsub('.', function(x) local r,b='',x:byte() for i...
475
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/GitAPI/LuaSecret.luau
luau
.luau
local secretToData = setmetatable({}::{[any]: {value: Secret | string, authorizedEnv: any, metadata: {[string]: any}}}, {__mode = "k"}) local function checkToRootEnv(secret: LuaSecret, levelToRootEnv: number) if not levelToRootEnv then error("levelToRootEnv is a required parameter.") end local data = secretToData...
795
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/HierarchyState.luau
luau
.luau
--!strict --!optimize 2 local ScriptEditorService = game:GetService("ScriptEditorService") local Types = require("../Types") local Jecs = require("../Jecs") local RawInst = require("./Small/RawInst") local JexpTags = require("./Small/JexpTags") local Constants = require("../Constants") local JQL = require("./JQL") l...
8,910
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Info/InsertSuggestedClasses.luau
luau
.luau
local INSERT_SUGGESTED_CLASSES: {[string]: {string}} = { Workspace = { "Part", "MeshPart", "Model", "Folder", "Pointer", }, Players = { "Pointer" }, CoreGui = { "ScreenGui", "Pointer" }, Lighting = { "Sky", "Atmosphere", "SunRaysEffect", "ColorCorrectionEffect", "BlurEffect", "BloomEf...
528
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Info/InstClasses.luau
luau
.luau
return { "Pointer", "Frame", "ForceField", "Folder", "FloorWire", "FloatCurve", "FlangeSoundEffect", "Fire", "FileMesh", "Explosion", "EulerRotationCurve", "EqualizerSoundEffect", "EchoSoundEffect", "DynamicRotate", "Dragger", "DoubleConstrainedValue", "DockWidgetPluginGui", "DistortionSoundEffect", ...
1,222
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Info/InstanceCategories.luau
luau
.luau
return { Meta = { "Pointer" }, Input = { "ProximityPrompt", "ClickDetector", "DragDetector", "UIDragDetector", "InputAction", "InputBinding", "InputContext" }, UI = { "SurfaceGui", "BillboardGui", "ScreenGui", "Frame", "TextLabel", "TextButton", "TextBox", "ImageLabel", "Image...
1,429
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/JQL.luau
luau
.luau
--!strict local Selection = game:GetService("Selection") local Types = require("../Types") local UDF = require(script.Parent.UDF) local Jecs = require("../Jecs") local RawInst = require("./Small/RawInst") local rawindex = RawInst.rawindex local selectionVersion = 0 type Id = Jecs.Id type World = Types.World type E...
9,309
athar-adv/Jexplorer
athar-adv-Jexplorer-230cba3/src/Shared/Luaup/span.luau
luau
.luau
local cst = require("./cst") local function unreachable(_: never): never error("unreachable") end local span_generic_declaration: (cst.GenericDeclaration) -> cst.Span local span_generic_declaration_with_defaults: (cst.GenericDeclarationWithDefaults) -> cst.Span local span_type_arg: (cst.TypeArg) -> cst.Span local sp...
3,645