TrianFiles/ModuleForasy

69 lines
2.1 KiB
Plaintext

-- Decompiler will be improved VERY SOON!
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM)
-- Decompiled on 2025-05-30 00:47:48
-- Luau version 6, Types version 3
-- Time taken: 0.001929 seconds
local module_upvr = {
MaxMessages = 3;
}
module_upvr.__index = module_upvr
local Container_upvr = script:WaitForChild("Container")
function module_upvr.new(arg1, arg2) -- Line 16
--[[ Upvalues[2]:
[1]: module_upvr (readonly)
[2]: Container_upvr (readonly)
]]
local setmetatable_result1 = setmetatable({
Active = {};
Count = 0;
}, module_upvr)
setmetatable_result1.Instance = Container_upvr:Clone()
arg2(setmetatable_result1.Instance)
setmetatable_result1.Instance.Parent = arg1
return setmetatable_result1
end
local MessageBox_upvr = require(script.MessageBox)
function module_upvr.CreateMessage(arg1, arg2, arg3) -- Line 29
--[[ Upvalues[2]:
[1]: module_upvr (readonly)
[2]: MessageBox_upvr (readonly)
]]
if module_upvr.MaxMessages <= #arg1.Active then
local popped = table.remove(arg1.Active, 1)
if popped then
popped.Skip = true
popped:SoftDestroy()
end
end
local any_new_result1_upvr_2 = MessageBox_upvr.new(arg1.Instance, -arg1.Count, arg2)
table.insert(arg1.Active, any_new_result1_upvr_2)
arg1.Count += 1
any_new_result1_upvr_2:Open()
local var14_upvr = tonumber(arg3) or 5
task.delay(MessageBox_upvr.TweenTime, function() -- Line 47
--[[ Upvalues[3]:
[1]: var14_upvr (readonly)
[2]: any_new_result1_upvr_2 (readonly)
[3]: arg1 (readonly)
]]
while os.clock() - os.clock() < var14_upvr and any_new_result1_upvr_2.Skip ~= true and any_new_result1_upvr_2.Destroying ~= true do
task.wait()
end
if any_new_result1_upvr_2.Skip ~= true then
local table_find_result1_2 = table.find(arg1.Active, any_new_result1_upvr_2)
if table_find_result1_2 then
table.remove(arg1.Active, table_find_result1_2)
end
any_new_result1_upvr_2:SoftDestroy()
end
end)
end
function module_upvr.Clear(arg1) -- Line 65
for _, v in arg1.Active do
v:SoftDestroy()
end
table.clear(arg1.Active)
end
return module_upvr