return function(r)local P=client.UI.Prepare(script.Parent.Parent)local L=P.Frame local M=L.Frame local n=M.Message local c=M.Title local D=r.gIndex local S=r.gTable local O=r.Title local X=r.Message local q=r.Scroll local i=r.Time if not r.Message or not r.Title then S:Destroy()end c.Text=O n.Text=X local function k()for r=1,12,1 do n.TextTransparency=n.TextTransparency+.05 c.TextTransparency=c.TextTransparency+.05 n.TextStrokeTransparency=n.TextStrokeTransparency+.05 c.TextStrokeTransparency=c.TextStrokeTransparency+.05 M.BackgroundTransparency=M.BackgroundTransparency+.05 service.Wait("\083\116\101\112\112\101\100")end;(service.UnWrap(P)):Destroy()end S.CustomDestroy=function()k()end spawn(function()local r=Instance.new("\083\111\117\110\100",service.LocalContainer())r.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\049\053\050\053\054\049\055\053\051"r.Volume=.3 wait(.1)r:Play()wait(1)r:Destroy()end)S.Ready()L:TweenSize(UDim2.new(0,350,0,150),Enum.EasingDirection.Out,Enum.EasingStyle.Quint,.2)if not i then local r,P=X:gsub(" ","")P=math.clamp(P/2,4,11)+1 wait(P)else wait(i)end k()end
--// All global vars will be wiped/replaced except script

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
