return function(O)local X=service.PlayerGui local w=service.Players.LocalPlayer local G=script.Parent.Parent local m=G.Frame.Close local v=G.Frame.Main local k=G.Frame.Title local C=G.Frame.Timer local r=O.gTable local c=O.OnClick local M=O.OnClose local a=O.OnIgnore local N=O.Title local z=O.Message or O.Text or""local A=O.Time local u=nil if c and type(c)=="\115\116\114\105\110\103"then c=client.Core.LoadCode(c,GetEnv())end if M and type(M)=="\115\116\114\105\110\103"then M=client.Core.LoadCode(M,GetEnv())end if a and type(a)=="\115\116\114\105\110\103"then a=client.Core.LoadCode(a,GetEnv())end local y=client.UI.Get("\078\111\116\105\102\105\099\097\116\105\111\110\072\111\108\100\101\114",nil,true)if not y then local O=service.New("\083\099\114\101\101\110\071\117\105")local X=client.UI.Register(O)local w=service.New("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",O)client.UI.Prepare(O)X.Name="\078\111\116\105\102\105\099\097\116\105\111\110\072\111\108\100\101\114"w.Name="\070\114\097\109\101"w.BackgroundTransparency=1 w.Size=UDim2.new(0,200,.5,0)w.Position=UDim2.new(1,-210,.5,-10)w.CanvasSize=UDim2.new(0,0,0,0)w.ChildAdded:Connect(function(O)if#w:GetChildren()==0 then w.Visible=false else w.Visible=true end end)w.ChildRemoved:Connect(function(O)if#w:GetChildren()==0 then w.Visible=false else w.Visible=true end end)y=X X:Ready()end local function P(O,X)local w={}for O,X in pairs(O:children())do table.insert(w,1,X)end for O,w in pairs(w)do w.Position=UDim2.new(0,0,1,-75*(O+X))end O.CanvasSize=UDim2.new(0,0,0,#O:children()*75)local G=#O:children()*75-O.AbsoluteWindowSize.Y if G<0 then G=0 end O.CanvasPosition=Vector2.new(0,G)end y=y.Object.Frame k.Text=N G.Name=N v.Text=z v.MouseButton1Click:Connect(function()if G and G.Parent then if c then u=c()end G:Destroy()P(y,0)end end)m.MouseButton1Click:Connect(function()if G and G.Parent then if M then u=M()end r:Destroy()P(y,0)end end)P(y,1)G.Parent=y G.Size=UDim2.new(0,0,0,0)G:TweenSize(UDim2.new(1,-5,0,60),"\079\117\116","\081\117\097\100",.2)G:TweenPosition(UDim2.new(0,0,1,-75),"\079\117\116","\076\105\110\101\097\114",.2)spawn(function()local O=Instance.new("\083\111\117\110\100",service.LocalContainer())if z=="\067\108\105\099\107 \104\101\114\101 \102\111\114 \099\111\109\109\097\110\100\115\046"then O.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\050\056\055\049\054\052\053\050\051\053"elseif N=="\087\097\114\110\105\110\103\033"then O.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\052\050\057\049\054\057\053\056"else O.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\053\053\053\052\057\051\054\056\051"end wait(.1)O:Play()wait(1)O:Destroy()end)if A then C.Visible=true spawn(function()repeat C.Text=A wait(1)A=A-1 until A<=0 or not G or not G.Parent if G and G.Parent then if a then u=a()end G:Destroy()P(y,0)end end)end repeat wait()until u~=nil or not G or not G.Parent return u end
--// All global vars will be wiped/replaced except script

return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer

	local frame = script.Parent.Parent
	local close = frame.Frame.Close
	local main = frame.Frame.Main
	local title = frame.Frame.Title
	local timer = frame.Frame.Timer

	local gTable = data.gTable
	local clickfunc = data.OnClick
	local closefunc = data.OnClose
	local ignorefunc = data.OnIgnore

	local name = data.Title
	local text = data.Message or data.Text or ""
	local time = data.Time

	local returner = nil

	if clickfunc and type(clickfunc) == "string" then
		clickfunc = client.Core.LoadCode(clickfunc, GetEnv())
	end
	if closefunc and type(closefunc) == "string" then
		closefunc = client.Core.LoadCode(closefunc, GetEnv())
	end
	if ignorefunc and type(ignorefunc) == "string" then
		ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv())
	end

	--client.UI.Make("NotificationHolder")
	local holder = client.UI.Get("NotificationHolder", nil, true)
	if not holder then
		local hold = service.New("ScreenGui")
		local hTable = client.UI.Register(hold)
		local frame = service.New("ScrollingFrame", hold)
		client.UI.Prepare(hold)
		hTable.Name = "NotificationHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(0, 200, 0.5, 0)
		frame.Position = UDim2.new(1, -210, 0.5, -10)
		frame.CanvasSize = UDim2.new(0, 0, 0, 0)
		frame.ChildAdded:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		frame.ChildRemoved:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		holder = hTable
		hTable:Ready()
	end

	local function moveGuis(holder, mod)
		local holdstuff = {}
		for i, v in pairs(holder:children()) do
			table.insert(holdstuff, 1, v)
		end
		for i, v in pairs(holdstuff) do
			v.Position = UDim2.new(0, 0, 1, -75 * (i + mod))
		end
		holder.CanvasSize = UDim2.new(0, 0, 0, (#holder:children() * 75))
		local pos = (((#holder:children()) * 75) - holder.AbsoluteWindowSize.Y)
		if pos < 0 then
			pos = 0
		end
		holder.CanvasPosition = Vector2.new(0, pos)
	end

	holder = holder.Object.Frame
	title.Text = name
	frame.Name = name
	main.Text = text

	main.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if clickfunc then
				returner = clickfunc()
			end
			frame:Destroy()
			moveGuis(holder, 0)
		end
	end)

	close.MouseButton1Click:Connect(function()
		if frame and frame.Parent then
			if closefunc then
				returner = closefunc()
			end
			gTable:Destroy()
			moveGuis(holder, 0)
		end
	end)

	moveGuis(holder, 1)
	frame.Parent = holder
	frame.Size = UDim2.new(0, 0, 0, 0)
	frame:TweenSize(UDim2.new(1, -5, 0, 60), "Out", "Quad", 0.2)
	frame:TweenPosition(UDim2.new(0, 0, 1, -75), "Out", "Linear", 0.2)

	spawn(function()
		local sound = Instance.new("Sound", service.LocalContainer())
		if text == "Click here for commands." then
			sound.SoundId = "rbxassetid://2871645235"
		elseif name == "Warning!" then
			sound.SoundId = "rbxassetid://142916958"
		else
			sound.SoundId = "rbxassetid://1555493683"
		end
		wait(0.1)
		sound:Play()
		wait(1)
		sound:Destroy()
	end)

	if time then
		timer.Visible = true
		spawn(function()
			repeat
				timer.Text = time
				--timer.Size=UDim2.new(0,timer.TextBounds.X,0,10)
				wait(1)
				time = time - 1
			until time <= 0 or not frame or not frame.Parent

			if frame and frame.Parent then
				if ignorefunc then
					returner = ignorefunc()
				end
				frame:Destroy()
				moveGuis(holder, 0)
			end
		end)
	end

	repeat
		wait()
	until returner ~= nil or not frame or not frame.Parent

	return returner
end
