-- ModuleScript StateObject (via bytefall decompiler) -- Decompiled using ByteFall -- discord.gg/pHTnqmmWzk game:GetService("CollectionService") game:GetService("RunService") local util = require(game.ReplicatedStorage.Modules.Util) require(game.ReplicatedStorage.Modules.Net) require(game.ReplicatedStorage.Modules.State) require(game.ReplicatedStorage.Modules.Event) local streaming = require(script.Streaming) local static = require(script.Static) local LocalPlayer = game.Players.LocalPlayer getfenv().script = nil local t1: {[any]: any} = {} local t2: {[any]: any} = {} local t3: {[any]: any} = { boolean = "Bool", string = "String", number = "Number", Instance = "Object", ["nil"] = "Object", Vector3 = "Vector3", CFrame = "CFrame", Color3 = "Color3" } t3 = {} local module: {[any]: any} = { classes = {}, get_global_object = function(p1) if t3[p1] then return t3[p1] end local v10 if game.Workspace.StreamingEnabled then v10 = streaming.create_global_object(p1) else v10 = static.create_global_object(p1) end t3[p1] = v10 v10:destroying(function() t3[p1] = nil end) for key, value in t2 do task.spawn(value, v10) end return v10 end } function process_object(p2, p3, p4) if not p2.processing[p3] then if p2.objects[p3] then return p2.objects[p3] end p2.processing[p3] = true local v16 = module.get_global_object(p3) local v17 if game.Workspace.StreamingEnabled then v17 = streaming.create_object(p2, p3, v16) else v17 = static.create_object(p2, p3, v16) end p2.objects[p3] = v17 v17:destroying(function() p2.objects[p3] = nil end) for iterFirst, iterSecond in p2.hooks, nil, nil do iterSecond(v17) end for key, value in t1 do task.spawn(value, v17) end p2.processing[p3] = nil return v17 end if p4 then return util.get(p2.objects, p3) end end function listen(p5, p6) for iterFirst, iterSecond in p5.objects, nil, nil do task.spawn(p6, iterSecond) end table.insert(p5.hooks, p6) return { unhook = function() local v46 = table.find(p5.hooks, p6) if v46 then table.remove(p5.hooks, v46) end end } end class_hooks = {} function module.class(p7, p8) if module.classes[p7] then return module.classes[p7] end local t5: {[any]: any} = { objects = {}, processing = {}, process_object = process_object, hooks = {}, hook = listen, states = p8, tag = p7 } util.hook_tagged(p7, function(p9) t5:process_object(p9) end) if class_hooks[p7] then for iterFirst, iterSecond in class_hooks[p7], nil, nil do t5:hook(iterSecond) end class_hooks[p7] = nil end module.classes[p7] = t5 return t5 end function module.hook(p10, p11) if module.classes[p10] then return module.classes[p10]:hook(p11) end class_hooks[p10] = class_hooks[p10] or {} table.insert(class_hooks[p10], p11) return { unhook = function() local v48 = class_hooks[p10] and table.find(class_hooks[p10], p11) if v48 then table.remove(class_hooks[p10], v48) end end } end function module.get_all(p12) if module.classes[p12] then return module.classes[p12].objects end return {} end function module.get_all_global() return t3 end function module.get(p13, p14) return util.get(module.classes, p13).objects[p14] or module.classes[p13]:process_object(p14, true) end function module.hook_all(p15) for iterFirst, iterSecond in module.classes, nil, nil do for iterFirst2, iterSecond2 in iterSecond.objects, nil, nil do task.spawn(p15, iterSecond2) end end table.insert(t1, p15) return { unhook = function() local v49 = table.find(t1, p15) if v49 then table.remove(t1, v49) end end } end function module.hook_all_unique(p16) for key, value in t3 do task.spawn(p16, value) end table.insert(t2, p16) return { unhook = function() local v50 = table.find(t2, p16) if v50 then table.remove(t2, v50) end end } end function module.has(p17, p18) if module.classes[p17] and module.classes[p17].objects[p18] then return true end end function module.load() end setmetatable(module, {}) return module