-- Decompiled with the Synapse X Luau decompiler.

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local l__Message__2 = u1.GUI.Message;
local u3 = {};
local u4 = false;
function v1.New(p1, ...)
	local v2 = { ... };
	if u1.Variables.MessageOpen == true then
		while true do
			u1.RunService.RenderStepped:Wait();
			if u1.Variables.MessageOpen == false then
				break;
			end;		
		end;
	end;
	local v3 = false;
	if v2[1] == nil then
		v3 = v2[2] == nil;
	end;
	local v4 = false;
	if type(v2[1]) == "boolean" then
		v4 = v2[2] == nil;
	end;
	if v2[1] then
		local v5 = v2[2];
	end;
	l__Message__2.No.Visible = false;
	l__Message__2.Ok.Visible = false;
	l__Message__2.Yes.Visible = false;
	l__Message__2.Cancel.Visible = false;
	l__Message__2.Option1.Visible = false;
	l__Message__2.Option2.Visible = false;
	l__Message__2.Desc.Text = p1;
	if not v3 then
		if v4 then
			l__Message__2.No.Visible = true;
			l__Message__2.Yes.Visible = true;
		elseif v2[1] and v2[2] then
			l__Message__2.Option1.Title.Text = v2[1];
			l__Message__2.Option2.Title.Text = v2[2];
			l__Message__2.Cancel.Visible = true;
			l__Message__2.Option1.Visible = true;
			l__Message__2.Option2.Visible = true;
		end;
	else
		l__Message__2.Ok.Visible = true;
	end;
	local v6 = Instance.new("BindableEvent");
	if l__Message__2.No.Visible then
		local function u5()
			Close();
			v6:Fire(false);
		end;
		u3[#u3 + 1] = l__Message__2.No.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u5();
				u4 = false;
			end;
		end);
	end;
	if l__Message__2.Yes.Visible then
		local function u6()
			Close();
			v6:Fire(true);
		end;
		u3[#u3 + 1] = l__Message__2.Yes.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u6();
				u4 = false;
			end;
		end);
	end;
	if l__Message__2.Ok.Visible then
		local function u7()
			Close();
			v6:Fire(true);
		end;
		u3[#u3 + 1] = l__Message__2.Ok.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u7();
				u4 = false;
			end;
		end);
	end;
	if l__Message__2.Option1.Visible then
		local function u8()
			Close();
			v6:Fire(1);
		end;
		u3[#u3 + 1] = l__Message__2.Option1.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u8();
				u4 = false;
			end;
		end);
	end;
	if l__Message__2.Option2.Visible then
		local function u9()
			Close();
			v6:Fire(2);
		end;
		u3[#u3 + 1] = l__Message__2.Option2.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u9();
				u4 = false;
			end;
		end);
	end;
	if l__Message__2.Cancel.Visible then
		local function u10()
			Close();
			v6:Fire(false);
		end;
		u3[#u3 + 1] = l__Message__2.Cancel.Activated:Connect(function()
			if u4 == false then
				u4 = true;
				u10();
				u4 = false;
			end;
		end);
	end;
	if u1.Variables.Console then
		if l__Message__2.Ok.Visible then
			u1.GuiService.SelectedObject = l__Message__2.Ok;
		elseif l__Message__2.Yes.Visible then
			u1.GuiService.SelectedObject = l__Message__2.Yes;
		elseif l__Message__2.Option1.Visible then
			u1.GuiService.SelectedObject = l__Message__2.Option1;
		end;
		local u11 = false;
		u3[#u3 + 1] = u1.UserInputService.InputEnded:Connect(function(p2, p3)
			if not u11 then
				u11 = true;
				if p2.KeyCode == Enum.KeyCode.ButtonB then
					Close();
				end;
				u11 = false;
			end;
		end);
	end;
	Open();
	local v7 = v6.Event:Wait();
	v6:Destroy();
	return v7;
end;
function v1.IsOpen()
	return l__Message__2.Gui.Enabled;
end;
function Close()
	for v8, v9 in ipairs(u3) do
		v9:Disconnect();	
	end;
	u3 = {};
	l__Message__2.Gui.Enabled = false;
	u1.Variables.MessageOpen = false;
end;
function Open()
	l__Message__2.Gui.Enabled = true;
	u1.Variables.MessageOpen = true;
end;
local l__next__11 = next;
local v12, v13 = l__Message__2.Frame:GetChildren();
while true do
	local v14, v15 = l__next__11(v12, v13);
	if not v14 then
		break;
	end;
	v13 = v14;
	if v15.ClassName == "ImageButton" then