return function(r)local i=script.Parent.Parent local j=i.Frame local t=j.Frame local x=t.Message local E=t.Title local H=r.gIndex local O=r.gTable local n=r.Title local C=r.Message local R=r.Scroll local G=r.Time local s=false if not r.Message or not r.Title then O:Destroy()end E.Text=""x.Text=""local function P()O:Ready()j.Notify:Play()local r=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(j,TweenInfo.new(.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position=UDim2.new(.5,0,.5,-18)})r:Play()r.Completed:Wait()E.Text=n local i=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(j,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),{Size=UDim2.new(0,350,0,150)})i:Play()i.Completed:Wait();((game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(E,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Position=UDim2.new(0,10,0,10)})):Play()for r=1,#C,1 do x.Text=C:sub(1,r);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()end end local function z()if not s then s=true;((game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(E,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Position=UDim2.new(0,10,0,-20)})):Play()for r=#tostring(C),1,-1 do x.Text=C:sub(1,r);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()end x.Text=""local r=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(j,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),{Size=UDim2.new(0,64,0,64)})r:Play()r.Completed:Wait()local t=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(j,TweenInfo.new(.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position=UDim2.new(.5,0,0,-100)})t:Play()t.Completed:Wait();(service.UnWrap(i)):Destroy()end end O.CustomDestroy=function()z()end P()wait(G or 5)if not s then z()end end
--// All global vars will be wiped/replaced except script

return function(data)
	local gui = script.Parent.Parent --client.UI.Prepare(script.Parent.Parent)
	local frame = gui.Frame
	local frame2 = frame.Frame
	local msg = frame2.Message
	local ttl = frame2.Title

	local gIndex = data.gIndex
	local gTable = data.gTable

	local title = data.Title
	local message = data.Message
	local scroll = data.Scroll
	local tim = data.Time

	local gone = false

	if not data.Message or not data.Title then
		gTable:Destroy()
	end

	ttl.Text = ""
	msg.Text = ""

	local function fadeIn()
		gTable:Ready()
		frame.Notify:Play()
		local Tween = game:GetService("TweenService"):Create(
			frame,
			TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out),
			{ Position = UDim2.new(0.5, 0, 0.5, -18) }
		)
		Tween:Play()
		Tween.Completed:Wait()
		ttl.Text = title
		local Tween = game:GetService("TweenService"):Create(
			frame,
			TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
			{ Size = UDim2.new(0, 350, 0, 150) }
		)
		Tween:Play()
		Tween.Completed:Wait()
		game:GetService("TweenService")
			:Create(
				ttl,
				TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
				{ Position = UDim2.new(0, 10, 0, 10) }
			)
			:Play()
		for i = 1, #message, 1 do
			msg.Text = message:sub(1, i)
			game:GetService("RunService").Heartbeat:wait()
		end
	end

	local function fadeOut()
		if not gone then
			gone = true
			game:GetService("TweenService")
				:Create(
					ttl,
					TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
					{ Position = UDim2.new(0, 10, 0, -20) }
				)
				:Play()
			for i = #tostring(message), 1, -1 do
				msg.Text = message:sub(1, i)
				game:GetService("RunService").Heartbeat:wait()
			end
			msg.Text = ""
			local Tween = game:GetService("TweenService"):Create(
				frame,
				TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
				{ Size = UDim2.new(0, 64, 0, 64) }
			)
			Tween:Play()
			Tween.Completed:Wait()
			local Tween = game:GetService("TweenService"):Create(
				frame,
				TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out),
				{ Position = UDim2.new(0.5, 0, 0, -100) }
			)
			Tween:Play()
			Tween.Completed:Wait()
			service.UnWrap(gui):Destroy()
		end
	end

	gTable.CustomDestroy = function()
		fadeOut()
	end

	fadeIn()
	wait(tim or 5)
	if not gone then
		fadeOut()
	end
end
