return function(P)local l=script.Parent.Parent local L=l.Frame local y=L.Frame local d=y.Message local c=y.Title local X=P.gIndex local H=P.gTable local k=P.Title local Y=P.Message local J=P.Scroll local U=P.Time local o=false if not P.Message or not P.Title then H:Destroy()end c.Text=""d.Text=""local function Q()H:Ready()L.Notify:Play()local P=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(L,TweenInfo.new(.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position=UDim2.new(.5,0,.5,-18)})P:Play()P.Completed:Wait()c.Text=k local l=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(L,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),{Size=UDim2.new(0,350,0,150)})l:Play()l.Completed:Wait();((game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(c,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Position=UDim2.new(0,10,0,10)})):Play()for P=1,#Y,1 do d.Text=Y:sub(1,P);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()end end local function s()if not o then o=true;((game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(c,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Position=UDim2.new(0,10,0,-20)})):Play()for P=#tostring(Y),1,-1 do d.Text=Y:sub(1,P);(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat:wait()end d.Text=""local P=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(L,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),{Size=UDim2.new(0,64,0,64)})P:Play()P.Completed:Wait()local y=(game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")):Create(L,TweenInfo.new(.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out),{Position=UDim2.new(.5,0,0,-100)})y:Play()y.Completed:Wait();(service.UnWrap(l)):Destroy()end end H.CustomDestroy=function()s()end Q()wait(U or 5)if not o then s()end end


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
