-- rowikis runs this script on your published place through Roblox's Luau execution API to read your game's data. -- It loads your ModuleScripts and returns the plain values they hand back (numbers, strings, tables). It never -- reads script source, never saves anything, and calls no DataStore or MemoryStore itself; Roblox discards any -- change a script makes when the session ends. A module that reads a DataStore while it loads still will. local HttpService = game:GetService("HttpService") local ROOTS = { "ReplicatedStorage", "ReplicatedFirst", "ServerStorage", "ServerScriptService" } local MAX_MODULES = 1500 local MAX_MODULE_BYTES = 250000 local MAX_TOTAL_BYTES = 3500000 local MAX_DEPTH = 16 local REQUIRE_SECONDS = 3 local function isArray(value) local count = 0 for _ in value do count += 1 end return count > 0 and count == #value end -- functions, instances and repeated tables are left out; colours become hex and enums their names local function plain(value, seen, depth) local kind = typeof(value) if kind == "string" or kind == "boolean" then return value elseif kind == "number" then return if value ~= value or value == math.huge or value == -math.huge then nil else value elseif kind == "Color3" then return `#{value:ToHex()}` elseif kind == "EnumItem" then return value.Name elseif kind ~= "table" or seen[value] or depth > MAX_DEPTH then return nil end seen[value] = true local out = {} if isArray(value) then for index = 1, #value do local inner = plain(value[index], seen, depth + 1) if inner ~= nil then table.insert(out, inner) end end else for key, inner in value do if type(key) == "string" or type(key) == "number" then out[tostring(key)] = plain(inner, seen, depth + 1) end end end seen[value] = nil return out end local function load(module) local finished, ok, loaded = false, false, nil task.spawn(function() ok, loaded = pcall(require, module) finished = true end) local started = os.clock() while not finished and os.clock() - started < REQUIRE_SECONDS do task.wait() end if not finished then return false, "took longer than 3 seconds to load" end return ok, loaded end local modules = {} local total = 0 for _, rootName in ROOTS do for _, module in game:GetService(rootName):GetDescendants() do if not module:IsA("ModuleScript") or #modules >= MAX_MODULES then continue end -- installed libraries (Wally, npm) are not your game's data, and some spin forever when loaded headless local path = module:GetFullName() if path:find("Packages", 1, true) or path:find("node_modules", 1, true) or path:find("_Index", 1, true) then continue end local entry = { path = path } local ok, loaded = load(module) if not ok then entry.error = tostring(loaded) else local encoded, json = pcall(HttpService.JSONEncode, HttpService, plain(loaded, {}, 0)) if not encoded then entry.error = "returned something that isn't plain data" elseif #json > MAX_MODULE_BYTES or total + #json > MAX_TOTAL_BYTES then entry.error = `too large to send ({#json} bytes)` elseif json == "{}" or json == "[]" or json == "null" then -- a module made only of functions has no data to read continue else entry.json = json total += #json end end table.insert(modules, entry) end end return HttpService:JSONEncode({ gameId = game.GameId, placeId = game.PlaceId, placeVersion = game.PlaceVersion, modules = modules })