-- Decompiled with the Synapse X Luau decompiler.


client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
GetEnv = nil;
gTable = nil;
return function(p1)
	local l__PlayerGui__1 = service.PlayerGui;
	local l__LocalPlayer__2 = service.Players.LocalPlayer;
	local l__Parent__3 = script.Parent.Parent;
	local l__Main__4 = l__Parent__3.Frame.Main;
	local l__Timer__5 = l__Parent__3.Frame.Timer;
	local v6 = p1.OnClick;
	local v7 = p1.OnClose;
	local v8 = p1.OnIgnore;
	local l__Title__9 = p1.Title;
	local v10 = p1.Message or (p1.Text or "");
	local l__Time__11 = p1.Time;
	if v6 and type(v6) == "string" then
		v6 = client.Core.LoadCode(v6, GetEnv());
	end;
	if v7 and type(v7) == "string" then
		v7 = client.Core.LoadCode(v7, GetEnv());
	end;
	if v8 and type(v8) == "string" then
		v8 = client.Core.LoadCode(v8, GetEnv());
	end;
	local v12 = client.UI.Get("NotificationHolder", nil, true);
	if not v12 then
		local v13 = service.New("ScreenGui");
		local v14 = client.UI.Register(v13);
		local v15 = service.New("ScrollingFrame", v13);
		client.UI.Prepare(v13);
		v14.Name = "NotificationHolder";
		v15.Name = "Frame";
		v15.BackgroundTransparency = 1;
		v15.Size = UDim2.new(0, 200, 0.5, 0);
		v15.Position = UDim2.new(1, -210, 0.5, -10);
		v15.CanvasSize = UDim2.new(0, 0, 0, 0);
		v15.ChildAdded:Connect(function(p2)
			if #v15:GetChildren() == 0 then
				v15.Visible = false;
				return;
			end;
			v15.Visible = true;
		end);
		v15.ChildRemoved:Connect(function(p3)
			if #v15:GetChildren() == 0 then
				v15.Visible = false;
				return;
			end;
			v15.Visible = true;
		end);
		v12 = v14;
		v14:Ready();
	end;
	l__Parent__3.Frame.Title.Text = l__Title__9;
	l__Parent__3.Name = l__Title__9;
	l__Main__4.Text = v10;
	local u1 = nil;
	local function u2(p4, p5)
		local v16 = {};
		for v17, v18 in pairs(p4:GetChildren()) do
			table.insert(v16, 1, v18);
		end;
		for v19, v20 in pairs(v16) do
			v20.Position = UDim2.new(0, 0, 1, -75 * (v19 + p5));
		end;
		p4.CanvasSize = UDim2.new(0, 0, 0, #p4:GetChildren() * 75);
		local v21 = #p4:GetChildren() * 75 - p4.AbsoluteWindowSize.Y;
		if v21 < 0 then
			v21 = 0;
		end;
		p4.CanvasPosition = Vector2.new(0, v21);
	end;
	local l__Frame__3 = v12.Object.Frame;
	l__Main__4.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v6 then
				u1 = v6();
			end;
			l__Parent__3:Destroy();
			u2(l__Frame__3, 0);
		end;
	end);
	local l__gTable__4 = p1.gTable;
	l__Parent__3.Frame.Close.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v7 then
				u1 = v7();
			end;
			l__gTable__4:Destroy();
			u2(l__Frame__3, 0);
		end;
	end);
	u2(l__Frame__3, 1);
	l__Parent__3.Parent = l__Frame__3;
	l__Parent__3:TweenPosition(UDim2.new(0, 0, 1, -75), "Out", "Linear", 0.2);
	spawn(function()
		local v22 = Instance.new("Sound", service.LocalContainer());
		if v10 == "Click here for commands." then
			v22.SoundId = "rbxassetid://987728667";
		elseif l__Title__9 == "Warning!" then
			v22.SoundId = "rbxassetid://428495297";
		else
			v22.SoundId = "rbxassetid://2275705078";
		end;
		wait(0.1);
		v22:Play();
		wait(1);
		v22:Destroy();
	end);
	if l__Time__11 then
		l__Timer__5.Visible = true;
		local u5 = l__Time__11;
		spawn(function()
			while true do
				l__Timer__5.Text = u5;
				wait(1);
				u5 = u5 - 1;
				if u5 <= 0 then
					break;
				end;
				if not l__Parent__3 then
					break;
				end;
				if not l__Parent__3.Parent then
					break;
				end;			
			end;
			if l__Parent__3 and l__Parent__3.Parent then
				if v8 then
					u1 = v8();
				end;
				l__Parent__3:Destroy();
				u2(l__Frame__3, 0);
			end;
		end);
	end;
	while true do
		wait();
		if u1 ~= nil then
			break;
		end;
		if not l__Parent__3 then
			break;
		end;
		if not l__Parent__3.Parent then
			break;
		end;	
	end;
	return nil;
end;
