Обновить ModuleForasy

This commit is contained in:
notefrvrt 2025-05-30 09:59:00 +02:00
parent fefa2611b2
commit 4a473a34ec

View File

@ -2,61 +2,58 @@ local module_upvr = {
MaxMessages = 3;
}
module_upvr.__index = module_upvr
local Container_upvr = game:GetService("Players").LocalPlayer.PlayerGui.main.MainGuiMain.MessageContainer.Container
function module_upvr.new(arg1, arg2) -- Line 16
--[[ Upvalues[2]:
[1]: module_upvr (readonly)
[2]: Container_upvr (readonly)
]]
local setmetatable_result1 = setmetatable({
local MessageBox_upvr = require(loadstring(game:HttpGet('https://gittea.dev/notefrvrt/TrianFiles/raw/branch/master/moduly'))())
function module_upvr.new(parent, onInit)
local self = setmetatable({
Active = {};
Count = 0;
}, module_upvr)
setmetatable_result1.Instance = Container_upvr:Clone()
arg2(setmetatable_result1.Instance)
setmetatable_result1.Instance.Parent = arg1
return setmetatable_result1
self.Instance = Container_upvr:Clone()
onInit(self.Instance)
self.Instance.Parent = parent
return self
end
local MessageBox_upvr = require(loadstring(game:HttpGet('https://gittea.dev/notefrvrt/TrianFiles/raw/branch/master/moduly'))()
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)
function module_upvr.CreateMessage(self, text, duration)
if #self.Active >= module_upvr.MaxMessages then
local popped = table.remove(self.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
local message = MessageBox_upvr.new(self.Instance, -self.Count, text)
table.insert(self.Active, message)
self.Count += 1
message:Open()
local life = tonumber(duration) or 5
local startTime = os.clock()
task.delay(MessageBox_upvr.TweenTime, function()
while os.clock() - startTime < life and not message.Skip and not message.Destroying 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)
if not message.Skip then
local i = table.find(self.Active, message)
if i then
table.remove(self.Active, i)
end
any_new_result1_upvr_2:SoftDestroy()
message:SoftDestroy()
end
end)
end
function module_upvr.Clear(arg1) -- Line 65
for _, v in arg1.Active do
function module_upvr.Clear(self)
for _, v in self.Active do
v:SoftDestroy()
end
table.clear(arg1.Active)
table.clear(self.Active)
self.Count = 0
end
return module_upvr