return function(O)local z=client.UI.Prepare(script.Parent.Parent)local s=z.Frame local c=s.Frame local N=c.Message local B=c.Title local u=O.gIndex local x=O.gTable local y=O.Title local b=O.Message local p=O.Scroll local i=O.Time if not O.Message or not O.Title then x:Destroy()end B.Text=y N.Text=b local function e()for O=1,12,1 do N.TextTransparency=N.TextTransparency+.05 B.TextTransparency=B.TextTransparency+.05 N.TextStrokeTransparency=N.TextStrokeTransparency+.05 B.TextStrokeTransparency=B.TextStrokeTransparency+.05 c.BackgroundTransparency=c.BackgroundTransparency+.05 service.Wait("\083\116\101\112\112\101\100")end;(service.UnWrap(z)):Destroy()end x.CustomDestroy=function()e()end spawn(function()local O=Instance.new("\083\111\117\110\100",service.LocalContainer())O.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\049\053\050\053\054\049\055\053\051"O.Volume=.3 wait(.1)O:Play()wait(1)O:Destroy()end)x.Ready()s:TweenSize(UDim2.new(0,350,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quint,.2)if not i then local O,z=b:gsub(" ","")z=math.clamp(z/2,4,11)+1 wait(z)else wait(i)end e()end


return function(data)
	local gui = 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

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

	ttl.Text = title
	msg.Text = message
	
	local function fadeOut()
		for i = 1,12 do
			msg.TextTransparency = msg.TextTransparency+0.05
			ttl.TextTransparency = ttl.TextTransparency+0.05
			msg.TextStrokeTransparency = msg.TextStrokeTransparency+0.05
			ttl.TextStrokeTransparency = ttl.TextStrokeTransparency+0.05
			frame2.BackgroundTransparency = frame2.BackgroundTransparency+0.05
			service.Wait("Stepped")
		end
		service.UnWrap(gui):Destroy()
	end
	
	gTable.CustomDestroy = function()
		fadeOut()
	end

	spawn(function()
		local sound = Instance.new("Sound",service.LocalContainer())
		sound.SoundId = "rbxassetid://7152561753"
		sound.Volume = 0.3
		wait(0.1)
		sound:Play()
		wait(1)
		sound:Destroy()
	end)
	
	gTable.Ready()

	frame:TweenSize(UDim2.new(0, 350, 0, 150), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.2)

	if not tim then
		local _,time = message:gsub(" ","")
		time = math.clamp(time/2,4,11)+1
		wait(time)
	else
		wait(tim)
	end
	
	fadeOut()
end
