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
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/BiomeSelector.luau
luau
.luau
local BiomeSelector = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local StarterPlayer = game:GetService('StarterPlayer') local SplineMaps = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terrain.SplineMaps) local BiomesData = require(StarterPlayer.StarterPlayerScripts.Modules....
496
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/BiomesData.luau
luau
.luau
local Players = game:GetService('Players') local Player: Player = Players.LocalPlayer local PlayerScripts = Player.PlayerScripts local Modules = PlayerScripts:WaitForChild('Modules') local ForestGenerator = require(Modules.Chunks.Loading.Terrain.Biomes.Forest.ForestGenerator) local DesertGenerator = require(Modules....
347
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Desert/DesertGenerator.luau
luau
.luau
local DesertGenerator = {} function DesertGenerator.generate(chunkBlocks: buffer) end return DesertGenerator
20
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/DecorationsGenerator.luau
luau
.luau
local DecorationsGenerator = {} local StarterPlayer = game:GetService("StarterPlayer") local TreesGenerator = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terrain.Decorations.Trees.TreesGenerator) --local DandelionGenerator = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.Loading.Terra...
363
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Trees/Tree.luau
luau
.luau
local Tree = {} local ReplicatedStorage = game:GetService("ReplicatedStorage") local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local OAK_LOG_ID = ItemsData['Oak Log']['ID'] local OAK_LEAVES_ID = ItemsData['Oak Leaves']['ID'] local MIN_LOGS = 3 local MAX_LOGS = 5 local LOGS_INSIDE_TREE = 2 -- PRIVATE...
639
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Trees/TreesGenerator.luau
luau
.luau
local TreeGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local StarterPlayer = game:GetService("StarterPlayer") local Modules = StarterPlayer.StarterPlayerScripts.Modules local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ChunksUtil = require(ReplicatedStorage...
785
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/DandelionGenerator.luau
luau
.luau
local DandelionGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE = ChunkSet...
332
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/GrassGenerator.luau
luau
.luau
local GrassGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE = ChunkSetting...
313
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/OxeyeDaisyGenerator.luau
luau
.luau
local OxeyeGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE = ChunkSetting...
338
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/Decorations/Unused/PoppyGenerator.luau
luau
.luau
local PoppyGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE = ChunkSetting...
325
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/ForestGenerator.luau
luau
.luau
local ForestGenerator = {} local Players = game:GetService('Players') local ReplicatedStorage = game:GetService('ReplicatedStorage') local Player: Player = Players.LocalPlayer local PlayerScripts = Player.PlayerScripts local Modules = PlayerScripts:WaitForChild('Modules') local ChunksUtil = require(ReplicatedStorag...
540
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Forest/GrassLayerGenerator.luau
luau
.luau
local GrassLayerGenerator = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunksUtil = require(ReplicatedStorage.Shared.ChunksUtil) local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE: number = ...
687
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Jungle/JungleGenerator.luau
luau
.luau
local JungleGenerator = {} function JungleGenerator.generate(chunkBlocks: buffer) end return JungleGenerator
20
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/Biomes/Tundra/TundraGenerator.luau
luau
.luau
local TundraGenerator = {} function TundraGenerator.generate(chunkBlocks: buffer) end return TundraGenerator
23
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/TerrainShapeGenerator.luau
luau
.luau
--!native local TerrainShapeGenerator = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local Players = game:GetService('Players') local Player: Player = Players.LocalPlayer local PlayerScripts = Player.PlayerScripts local Modules = PlayerScripts:WaitForChild('Modules') local SplineMaps = require(...
751
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/ChunkRenderer.luau
luau
.luau
local ChunkRenderer = {} -- 3333 max blocks, if face culling implemented -- = 8 * 8 * 52 = 3328 blocks --local buffer = buffer.create(12288) local AssetService = game:GetService("AssetService") local Atlas = AssetService:CreateEditableImageAsync("rbxassetid://17400483416") local ReplicatedStorage = game:GetService('R...
1,647
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/AtlasTextureData.luau
luau
.luau
return { [1] = {}, [2] = {}, [3] = {2, 2, 2, 2, 2, 2}, [4] = {3, 3, 3, 3, 1, 2}, [5] = {9, 9, 9, 9, 9, 9}, [6] = {17, 17, 17, 17, 17, 17}, [7] = {4, 4, 4, 4, 5, 5}, [8] = {54, 54, 54, 54, 54, 54}, [9] = {21, 21, 21, 21, 22, 22}, }
176
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/BlockMeshData.luau
luau
.luau
local BlockMeshData = {} BlockMeshData.rightVertices = { Vector3.new(.5, .5, .5), Vector3.new(.5, .5, -.5), Vector3.new(.5, -.5, .5), Vector3.new(.5, -.5, -.5) } BlockMeshData.rightIndices = {3, 4, 2, 2, 1, 3} BlockMeshData.leftVertices = { Vector3.new(-.5, .5, -.5), Vector3.new(-.5, .5, .5), Vector3.new(-.5, ...
502
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Rendering/Data/PlantMeshData.luau
luau
.luau
local PlantMeshData = {} PlantMeshData.leftVertices = { Vector3.new(-.5, .5, -.5), Vector3.new(.5, .5, .5), Vector3.new(-.5, -.5, -.5), Vector3.new(.5, -.5, .5), } PlantMeshData.leftIndices = {3, 4, 2, 2, 1, 3} PlantMeshData.rightVertices = { Vector3.new(-.5, .5, .5), Vector3.new(.5, .5, -.5), Vector3.new(-.5,...
174
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/CollisionsManager.luau
luau
.luau
local CollisionsManager = {} local Players = game:GetService('Players') local ReplicatedStorage = game:GetService('ReplicatedStorage') local RunService = game:GetService('RunService') local Player: Player = Players.LocalPlayer local Character: Model = Player.Character or Player.CharacterAdded:Wait() local HumanoidRoo...
984
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Lighting.luau
luau
.luau
local LightingController = {} local Lighting = game:GetService('Lighting') local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local CHUNK_DISTANCE: number = ChunkSettings['CHUNK_DISTANCE'] local CHUNK_SIZE: number = ChunkSettings['CHUN...
120
centau/ecr
centau-ecr-da05212/src/ecr.luau
luau
.luau
-------------------------------------------------------------------------------- -- ecr.luau -- v0.9.0 -------------------------------------------------------------------------------- local ID_SIZE = 4 local MAX_ENTITIES = 0x0000_FFFF -------------------------------------------------------------------------------- --...
19,145
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Common/api_flags.luau
luau
.luau
return function(rt: any, memory_at_0: any, cfns: any, INDIRECT_FUNCTIONS: any, utils: typeof(require("./utils")())) local module = {} function module.luau_setflag(name: string, state: boolean) --// Flag name local flagNamePtr = utils.cstr(name) --// Set the flag cfns.set_flag(f...
175
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Common/polyfill.luau
luau
.luau
local task = task or (require)("@lune/task") return function(utils: typeof(require("./utils")())) local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS local polyfill = {} local FILE_MAP = { {}, {} } local LONGJMP_THROW_SIGN = newproxy(false) local __TIMERS = {} local __EXIT_STATUS = nil local _...
1,207
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Common/runtime_create.luau
luau
.luau
local runtime_initialize = (require)("@self/runtime") local utils_create = require("./utils") return function(polyfill_create: typeof(require("./polyfill"))) local utils, utils_ready = utils_create() local polyfill, polyfill_ready = polyfill_create(utils) local common_imports = { func_list = polyfill } ...
194
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Common/utils.luau
luau
.luau
return function() local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS local module = {} function module.stub(name: string, ret: any) return function(...) if (STUB_WARN) then print(`[WARN]: stub function '{name}' called`) end return ret end ...
641
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Common/vector3_compat.luau
luau
.luau
--// Vanilla Luau Vector3 implementation --// Provides Vector3 lib if no existing implementation is available --// Missing: xAxis, yAxis, zAxis, Magnitude, Unit, and all namecall functions --// Last checked: 11 December 2024 local type = type local typeof = typeof local Vector3 = Vector3 or (if vector then { new = vect...
1,176
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Compiler/common.luau
luau
.luau
export type LuauCompileOptions = { OptimizationLevel: number, DebugLevel: number, TypeInfoLevel: number, CoverageLevel: number, VectorLibName: string?, VectorLibConstructor: string?, VectorType: string?, MutableGlobals: {string}?, DisabledBuiltins: {string}?, } local DEFAULT_LuauC...
1,072
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Compiler/entrypoint.luau
luau
.luau
local api_flags_create = require("../Common/api_flags") local runtime_create = require("../Common/runtime_create") local compiler_common_init = require("../Compiler/common") export type LuauCompileOptions = compiler_common_init.LuauCompileOptions local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS, utils = runtime_create(...
223
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/Full/entrypoint.luau
luau
.luau
local api_flags_create = require("../Common/api_flags") local runtime_create = require("../Common/runtime_create") local compiler_common_init = require("../Compiler/common") local vm_common_init = require("../VM/common") export type LuauCompileOptions = compiler_common_init.LuauCompileOptions local rt, memory_at_0, cf...
303
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/VM/common.luau
luau
.luau
return function(rt: any, memory_at_0: any, cfns: any, INDIRECT_FUNCTIONS: any, utils: typeof(require("../Common/utils")())) local module = {} function module.luau_run( bytecode: string, chunkName: string?, safeEnv: boolean? ): boolean -- load bytecode and chunkName to memory...
359
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/VM/entrypoint.luau
luau
.luau
local api_flags_create = require("../Common/api_flags") local runtime_create = require("../Common/runtime_create") local vm_common_init = require("../VM/common") local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS, utils = runtime_create(require("../VM/polyfill")) local api_flags = api_flags_create(rt, memory_at_0, cfns, ...
244
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/VM/luau_macros.luau
luau
.luau
local LUAI_MAXCSTACK = 8000 local LUA_REGISTRYINDEX = -LUAI_MAXCSTACK - 2000 local LUA_ENVIRONINDEX = -LUAI_MAXCSTACK - 2001 local LUA_GLOBALSINDEX = -LUAI_MAXCSTACK - 2002 local LUA_VECTOR_SIZE = 3 local LUA_TNONE = -1 local LUA_TNIL = 0 local LUA_TBOOLEAN = 1 local LUA_TLIGHTUSERDATA ...
2,343
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/snippets/VM/polyfill.luau
luau
.luau
local common_polyfill_create = require("../Common/polyfill") return function(utils: typeof(require("../Common/utils")())) local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS local polyfill, common_polyfill_ready = common_polyfill_create(utils) local START_CLOCK, NOW_TIME = os.clock(), os.time() * 1000 --...
1,115
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/src/builder/init.luau
luau
.luau
local fs = require("@lune/fs") local process = require("@lune/process") local regex = require("@lune/regex") local argparse = require("@self/argparse/src/lib") local VALID_FLAGS = { -- combines runtime and entrypoint into one file "BUILD_ONEFILE", } local PARSER = argparse("luauceptionbuilder") PARSER:option...
3,508
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/src/tests/run.luau
luau
.luau
local frktest = require("@frktest/frktest") local console_reporter = require("@frktest/reporters/console_reporter") local process = require("@lune/process") require("./suites/compiler") require("./suites/vm") require("./suites/full") console_reporter.init() local testOk = frktest.run() if (not testOk) then proces...
88
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/src/tests/suites/compiler.luau
luau
.luau
local frktest = require("@frktest/frktest") local test = frktest.test local check = frktest.assert.check local req = frktest.assert.require local msg = frktest.assert.msg test.suite("Compiler", function() local Compiler = require("../../../output/Luau.LuauCeption.Compiler") for opt = 0, 2 do for dbg = ...
468
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/src/tests/suites/full.luau
luau
.luau
local frktest = require("@frktest/frktest") local test = frktest.test local check = frktest.assert.check local req = frktest.assert.require local msg = frktest.assert.msg test.suite("Full", function() local Full = require("../../../output/Luau.LuauCeption.Full") for opt = 0, 2 do for dbg = 0, 2 do ...
834
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/src/tests/suites/vm.luau
luau
.luau
local frktest = require("@frktest/frktest") local test = frktest.test local check = frktest.assert.check local req = frktest.assert.require local msg = frktest.assert.msg test.suite("VM", function() local Compiler = require("../../../output/Luau.LuauCeption.Compiler") local VM = require("../../../output/Luau.L...
521
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/utils/_helpers/Test.luau
luau
.luau
local src = [[ for i = 1, 10, 1 do print(i) end ]] local Compiler = require("../../output/Luau.LuauCeption.Compiler") local VM = require("../../output/Luau.LuauCeption.VM") local Full = require("../../output/Luau.LuauCeption.Full") print("Compiler") print(Compiler.luau_compile(src, 1, 1, 0)) print(Compiler.luau_c...
316
RadiatedExodus/LuauCeption
RadiatedExodus-LuauCeption-c247337/utils/_helpers/test2.luau
luau
.luau
local luau = require("Luau.LuauCeption.Full.0.645") local ift = luau.wasm.indirect_function_table.data local cfns = luau.wasm.cfns local rt = luau.wasm.rt local memory_at_0 = luau.wasm.memory local macros = luau.wasm.macros local function cstr(str) local strLen = #str local strPtr = cfns.malloc(strLen + 1) ...
490
Pseudoreality/Roblox-Identities
Pseudoreality-Roblox-Identities-5576d4c/CheckCapabilities.luau
luau
.luau
local CHECKBOX_EMOJI = utf8.char(0x2705) local CROSS_EMOJI = utf8.char(0x274C) local function getSuccess(fn, ...) return ( pcall(fn, ...) ) end local function customSuccess(fn) local success, result = pcall(fn) return success and result end local capInfos = { { name = "Plugin", index = 0, canAccess = getSu...
783
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Commands/InstanceCmds.luau
luau
.luau
local Selection = game:GetService("Selection") local StarterGui = game:GetService("StarterGui") local Root = script:FindFirstAncestor("Metain") local Utils = require(Root.Utils) local InstanceCmds = {} function InstanceCmds.create_instance(data: {[string]: any}): {[string]: any} local className = data.className if...
1,205
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Commands/PropertyCmds.luau
luau
.luau
local ChangeHistoryService = game:GetService("ChangeHistoryService") local Root = script:FindFirstAncestor("Metain") local Utils = require(Root.Utils) local PropertyCmds = {} function PropertyCmds.set_property(data: {[string]: any}): {[string]: any} local target, targetErr = Utils.requireTarget(data.path) if targe...
950
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Commands/ScriptCmds.luau
luau
.luau
local ScriptEditorService = game:GetService("ScriptEditorService") local Selection = game:GetService("Selection") local Root = script:FindFirstAncestor("Metain") local Utils = require(Root.Utils) local ScriptCmds = {} function ScriptCmds.read_script(data: {[string]: any}): {[string]: any} local target, err = Utils....
1,021
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Commands/init.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ScriptCmds = require(script.Parent.ScriptCmds) local InstanceCmds = require(script.Parent.InstanceCmds) local PropertyCmds = require(script.Parent.PropertyCmds) local function run_luau(data: {[string]: any}): {[string]: any} local code = data.code ...
567
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Config.luau
luau
.luau
local Config = {} Config.PLUGIN_VERSION = "1.0.4" Config.SERVER_URL = "wss://turnstile.metain.dev" Config.MAX_RECONNECT_ATTEMPTS = 5 Config.state = { ws = nil :: WebStreamClient?, isConnected = false, isAuthorized = false, isReconnecting = false, reconnectToken = nil :: string?, lastUserId = nil :: string?, re...
126
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Main.server.luau
luau
.luau
local Root = script.Parent local Config = require(Root.Config) local UI = require(Root.UI) local Connection = require(Root.Connection) UI.init(plugin) UI.toggleButton.Click:Connect(function() UI.widget.Enabled = not UI.widget.Enabled end) UI.connectBtn.MouseButton1Click:Connect(function() local state = Config.sta...
143
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/UI.luau
luau
.luau
local Root = script:FindFirstAncestor("Metain") local Config = require(Root.Config) local UI = {} local statusDot local statusLabel local connectBtn local codeInput local function getColor(styleColor: Enum.StudioStyleGuideColor): Color3 return settings().Studio.Theme:GetColor(styleColor) end function UI.updateUI()...
1,644
metaindev/connect-plugin
metaindev-connect-plugin-ef41937/Utils.luau
luau
.luau
local ChangeHistoryService = game:GetService("ChangeHistoryService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerScriptService = game:GetService("ServerScriptService") local ServerStorage = game:GetService("ServerStorage") local StarterGui = game:GetService("StarterGui") local StarterPlay...
1,260
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/App.luau
luau
.luau
local plugin = script:FindFirstAncestorWhichIsA("Plugin") local Players = game:GetService("Players") local ContentProvider = game:GetService("ContentProvider") local UserService = game:GetService("UserService") local MarketplaceService = game:GetService("MarketplaceService") local HttpService = game:GetService("HttpSe...
7,330
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/ClientFalbackApp/init.luau
luau
.luau
-- If the user is play-testing on the client, fallback to this since the plugin won't work local plugin = script:FindFirstAncestorOfClass("Plugin") local ClientFallbackApp = {} ClientFallbackApp.__index = ClientFallbackApp local Theme = require(script.Parent.UI.Theme).global local StyleState = script.Parent.UI.Style...
416
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/DeserializerState.luau
luau
.luau
--!strict -- Stuff for deserialization with buffers. local plugin = script:FindFirstAncestorOfClass("Plugin") local DESERIALIZATION_KEY = "DataDelve_Deserialization" type PlaceSettings = { -- path to the default deserializer defaultDeserializer: {string}?, } type DeserializationSettings = { [--[[placeId:]] stri...
957
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/ExportImportHelper.luau
luau
.luau
local plugin = script:FindFirstAncestorWhichIsA("Plugin") local SelectionService = game:GetService("Selection") local StudioService = game:GetService("StudioService") local HttpService = game:GetService("HttpService") local ScriptEditorService = game:GetService("ScriptEditorService") local RunService = game:GetServic...
627
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/History.luau
luau
.luau
-- History for datastore connections and keys local MAIN_HISTORY_KEY = "DataDelveHistory alpha 1" local Types = require(script.Parent.Types) local History = {} History.__index = History function History.new(gameId: number) local self = setmetatable({ gameId = tostring(gameId), }, History) -- Sorted by most re...
906
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/Pages.luau
luau
.luau
-- Wrapper for page APIs -- TBH this causes too much indirection, kind of annoying to use local Pages = {} Pages.__index = Pages type PagesState = unknown type PagesInterface = { initialize: () -> (PagesState?, string?), next: (PagesState) -> { items: { unknown }?, isFinished: boolean } | { error: string }, } funct...
767
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/Session.luau
luau
.luau
-- Main interface with datastores local Types = require(script.Parent.Types) local Pages = require(script.Parent.Pages) local DataStoreService = game:GetService("DataStoreService") local Settings = require(script.Parent.Settings) local Session = {} Session.__index = Session -- Static function Session.new() local...
2,392
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/Settings.luau
luau
.luau
--!strict local ViewerTypes = require(script.Parent.UI.Viewers.Types) local BufferViewerTypes = require(script.Parent.UI.BufferViewers.Types) local MAIN_SETTINGS_KEY = "DataDelveSetting alpha 1" export type SettingsData = { themePreset: string, themeAccent: string, hideGameName: boolean, highlightColors: "Defaul...
378
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/Transactor.luau
luau
.luau
--!strict export type Transaction = () -> () export type TransactorImplementation = { __index: TransactorImplementation, new: () -> Transactor, destroy: (Transactor) -> (), transact: (Transactor, Transaction) -> boolean, } export type TransactorFields = { locked: boolean, lockedChanged: RBXScriptSignal, _lo...
288
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/Types.luau
luau
.luau
--!strict -- I was going to use this more, but I forgot about it. Now it houses these two types. type OldDataStoreConnectionBase = { name: string, scope: string?, isOrdered: boolean, } type OldAllScopesDataStoreConnection = OldDataStoreConnectionBase & { isOrdered: false, allScopes: true, } type OldNormalDataSto...
292
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Deserializer.luau
luau
.luau
--!strict local SelectionService = game:GetService("Selection") local ScriptEditorService = game:GetService("ScriptEditorService") local Types = require(script.Parent.Types) local ViewerTypes = require(script.Parent.Parent.Viewers.Types) local UIMessages = require(script.Parent.Parent.UIMessages) local Theme = requir...
2,767
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/DataInspector.luau
luau
.luau
--!strict -- I will document later. For now, good luck! 🫡 export type DataInspectorSizing = "fillContainer" | "fillContainerY" export type DataInspectorNewParams = { container: GuiObject, -- Default is "fillContainer" sizing: DataInspectorSizing?, theme: ThemeData, } export type ThemeData = { background: Color...
2,968
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/FormProvider/init.luau
luau
.luau
--!strict local HexEditor = require(script.Parent.HexEditor) local Validators = require(script.Parent.Parent.Parent.Parent.Validators) local constrainTextBoxStyleState = require(script.Parent.Parent.Parent.Utilities.constrainTextBoxStyleState) local StyleState = script.Parent.Parent.Parent.StyleState local LabelStyl...
1,167
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/HexEditor.luau
luau
.luau
--!strict -- I will document later. For now, good luck! 🫡 -- Parameters when using HexEditor.new(container, params, dependencies): -- "fillContainer" makes the hex editor fill up the entire container (UDim2.fromScale(1, 1)) -- "fillContainerY" makes the hex hex editor fill up the Y-axis, but take up only as much spa...
15,219
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Hex/init.luau
luau
.luau
--!strict local Theme = require(script.Parent.Parent.Theme) local Types = require(script.Parent.Types) local HexEditor = require(script.HexEditor) local DataInspector = require(script.DataInspector) local FormProvider = require(script.FormProvider) export type HexImplementation = { __index: HexImplementation, from...
1,373
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/BufferViewers/Types.luau
luau
.luau
--!strict local UIMessages = require(script.Parent.Parent.UIMessages) local Theme = require(script.Parent.Parent.Theme) export type BufferViewerMode = "Hex" | "Deserializer" export type BufferViewerFromOptions = { uiMessages: UIMessages.UIMessages, theme: Theme.Theme, inputReceiver: GuiObject, widget: PluginGui,...
187
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/ModalState.luau
luau
.luau
--!strict -- Keeps track if the UI has a modal or not. type ModalStateImplementation = { __index: ModalStateImplementation, new: () -> ModalState, push: (ModalState) -> (), pop: (ModalState) -> (), wrap: <T>(ModalState, action: () -> T) -> T, pushId: (ModalState, id: string) -> (), popId: (ModalState, id...
357
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/PopupHelper/init.luau
luau
.luau
-- Helps with popup stuff -- `clamp` clamps an object so it doesn't go out of bounds of a container -- `attach` attach an object to another object so it moves with that object -- `modal` turns an object into a modal so it blocks input from other objects -- `attach` and `modal` return objects that should be destroyed on...
1,956
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/BackgroundStyleState.luau
luau
.luau
local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local BackgroundStyleState = {} BackgroundStyleState.__index = BackgroundStyleState type BackgroundStyleStateOptions = { style: "default" | "popup" | "image" | "header", } function BackgroundStyleSta...
373
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/BreadcrumbsStyleState/init.luau
luau
.luau
-- Handles bread crumbs -- If the breadcrumbs is too long for the window, it will switch into a dropdown local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local ButtonStyleState = require(script.Parent.ButtonStyleState) local SelectStyleState = requi...
2,346
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/ButtonStyleState.luau
luau
.luau
local StyleStateHelper = require(script.Parent.StyleStateHelper) local ButtonStyleState = {} ButtonStyleState.__index = ButtonStyleState export type ButtonStyle = "primary" | "secondary" | "transparent" | "dormant" | "input" export type ButtonStyleStateFromOptions = { style: ButtonStyle | nil, disabled: boolean?, }...
1,361
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/CheckboxStyleState.luau
luau
.luau
local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local ButtonStyleState = require(script.Parent.Parent.ButtonStyleState) local CheckboxStyleState = {} CheckboxStyleState.__index = CheckboxStyleState export type CheckboxOptions = { default: b...
778
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/DatePickerStyleState.luau
luau
.luau
--!strict -- This wraps over TextBox -- Maybe later, can adjust for other locales. -- Also could add a calender popup. -- Use :getValue to get the value (unix timestamp milliseconds) -- Valid Formats: -- MM/DD/YY -- MM-DD-YY -- Month Day, Year -- Month Day -- ISO 8601 local TextBoxStyleState = require(script.Parent...
1,661
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/OverlayTextBoxStyleState.luau
luau
.luau
--!strict -- Only works with text box that are not multiline -- Does not support text boxes with UIPadding that uses Scale local TextService = game:GetService("TextService") local Players = game:GetService("Players") local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local Theme = require(script...
1,201
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/SelectStyleState/init.luau
luau
.luau
--!strict local TextService = game:GetService("TextService") local TweenService = game:GetService("TweenService") local Theme = require(script.Parent.Parent.Parent.Theme) local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper) local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local...
2,305
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/ShortcutsTextBoxStyleState/init.luau
luau
.luau
--!strict -- This handles "shortcuts text box" which are text box with shortcuts that auto replace special sequences. -- Shortcuts: -- @username: This will replace @username with the id of the user with that name -- Use :getText(errorHandler) to get the text instead of textBox.Text -- Must pass in a function to han...
662
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/ShortcutsTextBoxStyleState/parseShortcuts.luau
luau
.luau
--!strict export type ShortcutType = "normal" | "escapedNormal" | "mention" export type ShortcutPiece = { type: ShortcutType, content: string, -- "escapedNormal" will always start with \\ which should be ignored -- "mention" will always start with @ which should be ignored } export type ShortcutsString = { Shortc...
1,006
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/SwitchStyleState.luau
luau
.luau
--!strict -- Same as Checkbox, just styled differently local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local ButtonStyleState = require(script.Parent.Parent.ButtonStyleState) local SwitchStyleState = {} SwitchStyleState.__index = SwitchStyleState export type SwitchOptions = { default: boolea...
579
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Input/TextBoxStyleState/init.luau
luau
.luau
local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper) local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local TextBoxStyleState = {} TextBoxStyleState.__index = TextBoxStyleState function TextBoxStyleState.from(theme: any, textBox: TextBox & { UIStroke: UIStroke }) local self = s...
1,112
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/LabelStyleState.luau
luau
.luau
local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local LabelStyleState = {} LabelStyleState.__index = LabelStyleState export type LabelStyleStateFromOptions = { style: "text" | "error" | nil, emphasis: "normal" | "light" | nil } function LabelStyl...
574
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/LoadMoreListStyleState.luau
luau
.luau
-- Provide a `createItemStyleState(...)` function. -- Other consumers of the StyleState can then call `:add(...)` which will use the `createItemStyleState` to add a StyleState into the list. -- `Pages` does this when a new page is loaded. -- -- StyleStates produced from `createItemStyleState` can have method `setSelect...
940
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/ScrollingFrameStyleState.luau
luau
.luau
--!strict local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local ScrollingFrame = {} ScrollingFrame.__index = ScrollingFrame function ScrollingFrame.from(theme, scrollingFrame: ScrollingFrame) local self = setmetatable({ scrollingFrame = scrollin...
190
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/SeparatorStyleState.luau
luau
.luau
local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local SeparatorStyleState = {} SeparatorStyleState.__index = SeparatorStyleState function SeparatorStyleState.from(theme, separator: Frame) local self = setmetatable({ separator = separator, them...
263
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/StyleStateHelper.luau
luau
.luau
export type TransitionSpeed = "fast" | "slow" | "instant" | "veryFast" | "superDuperFast" | nil export type StyleState = { from: (theme: any, object: GuiObject, ...any) -> StyleState, update: (StyleState, TransitionSpeed) -> (), destroy: (StyleState, completely: boolean?) -> (), } local TweenService = game:GetServ...
550
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/StyleStateWrapper.luau
luau
.luau
-- Utility class useful for one-off style states. -- See `UI.createUserCard` for example local StyleStateHelper = require(script.Parent.StyleStateHelper) local StyleStateWrapper = {} StyleStateWrapper.__index = StyleStateWrapper export type StyleStateWrapperOptions = { autoFollowTheme: boolean?, -- default: true o...
352
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/TabsStyleState/init.luau
luau
.luau
local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.StyleStateHelper) local ButtonStyleState = require(script.Parent.ButtonStyleState) local TabsStyleState = {} TabsStyleState.__index = TabsStyleState function TabsStyleState.from(theme, frame: Frame) local buttons = {}...
736
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/ConfirmDialogStyleState/init.luau
luau
.luau
-- TODO: should auto-follow theme when using.createDialog local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper) local BackgroundStyleState = require(script.Parent.Parent.BackgroundStyleState) local ButtonStyleState = require(script...
734
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/ContextMenuStyleState/init.luau
luau
.luau
-- TODO: should auto-follow theme when using.createMenu local TweenService = game:GetService("TweenService") local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper) local TRY_CLOSE_SUBMENU_DELAY = 0.275 local ContextMenuStyleState ...
2,844
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/LoadingBarStyleState/init.luau
luau
.luau
-- Should be used ephemerally -- Example: -- ``` -- local styleState = LoadingBarStyleState.from(theme, frame) -- task.spawn(styleState.animate, styleState) -- task.wait(5) -- styleState:destroy() -- ``` local Theme = require(script.Parent.Parent.Parent.Theme) local GRADIENT_BILINEAR = NumberSequence.new({ NumberSe...
684
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/PopupFormStyleState/init.luau
luau
.luau
--!strict local StyleStateHelper = require(script.Parent.Parent.StyleStateHelper) local StyleStateWrapper = require(script.Parent.Parent.StyleStateWrapper) local PopupHelper = require(script.Parent.Parent.Parent.PopupHelper) local BackgroundStyleState = require(script.Parent.Parent.BackgroundStyleState) local ButtonS...
639
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/StyleState/Utility/SkeletonStyleState/init.luau
luau
.luau
-- Should be used ephemerally -- Just apply this to any object. -- Objects in the children that have attribute "SkeletonPlaceholder" will be styled. -- If they also have "DeleteWithSkeleton" attribute they will be deleted when the skeleton is deleted. --- Call :animate to animate the skeleton local TweenService = ga...
587
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Theme/Oklab.luau
luau
.luau
local Oklab = {} function Oklab.fromLinearSrgb(c: vector): vector local l = 0.4122214708 * c.x + 0.5363325363 * c.y + 0.0514459929 * c.z; local m = 0.2119034982 * c.x + 0.6806995451 * c.y + 0.1073969566 * c.z; local s = 0.0883024619 * c.x + 0.2817188376 * c.y + 0.6299787005 * c.z; local l_ = l ^ (1/3); local m_ ...
833
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Theme/init.luau
luau
.luau
--!strict local StudioSettings = settings().Studio local Oklab = require(script.Oklab) local Theme = {} Theme.__index = Theme Theme.accentHues = { red = 0, orange = 21, yellow = 42, yellowGreen = 72, green = 115, greenBlue = 140, seaGreen = 165, cyan = 190, blue = 220, purpleBlue = 235, purple = 265, pin...
8,678
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Tooltip/init.luau
luau
.luau
--!strict local TextService = game:GetService("TextService") local TweenService = game:GetService("TweenService") local PopupHelper = require(script.Parent.PopupHelper) local Tooltip = {} Tooltip.__index = Tooltip local FrameTemplate = script.FrameTemplate local DropShadowTemplate = script.DropShadowTemplate local ...
1,717
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/UIMessages/init.luau
luau
.luau
-- Utility to send alerts/toasts -- Layout manually calculated (no AutomaticSize). local TweenService = game:GetService("TweenService") local TextService = game:GetService("TextService") local StyleState = script.Parent.StyleState local PopupHelper = require(script.Parent.PopupHelper) local StyleStateWrapper = requi...
2,161
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Utilities/TimestampHelper.luau
luau
.luau
--!strict local TimestampHelper = {} -- Guesses what time of timestamp a number is, or nil if it doesn't look like a timestamp -- The second parameter is if the guess should be conservative and guess it's not a timestamp -- more often. function TimestampHelper.guessTimestampType(n: number, conservative: "conservative...
315
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Utilities/byteLengthToReadableString.luau
luau
.luau
--!strict local giga = 10^9 local mega = 10^6 local kilo = 10^3 return function(bytes: number) return tostring(bytes):reverse():gsub("(%d%d%d)", "%1,"):gsub(",$", ""):reverse() end
61
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Utilities/checkTrulyVisible.luau
luau
.luau
--!strict return function(object: GuiObject): boolean local current: any = object while current do if (not current) or not current.Visible then return false end current = current.Parent if current:IsA("LayerCollector") then break elseif not current:IsA("GuiObject") then return false end end re...
88
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Utilities/constrainTextBoxStyleState.luau
luau
.luau
--!strict -- Makes sure a TextBox matches a validator. return function(textBoxStyleState, validators: { (string) -> (boolean, string?) }) textBoxStyleState.textBox:GetPropertyChangedSignal("Text"):Connect(function() if textBoxStyleState.textBox.Text == "" then textBoxStyleState:setError(nil :: string?):update("...
142
pinehappi/DataDelve
pinehappi-DataDelve-191db10/src/UI/Utilities/createTabSwitchGroup.luau
luau
.luau
--!strict -- Makes it so when you press tab, it switches between the TextBoxes. local checkTrulyVisible = require(script.Parent.checkTrulyVisible) return function(textBoxes: { TextBox }) local currentSelected = nil local currentConnection: RBXScriptConnection? = nil for i, textBox in textBoxes do -- Don't need...
410