return function(u)local Y=script.Parent.Parent local M=service.PlayerGui local G=u.Message local r=u.Time or 15 local x=client.UI.Get("\072\105\110\116\072\111\108\100\101\114",nil,true)if not x then local u=service.New("\083\099\114\101\101\110\071\117\105")local Y=client.UI.Register(u)local M=service.New("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",u)client.UI.Prepare(u)Y.Name="\072\105\110\116\072\111\108\100\101\114"M.Name="\070\114\097\109\101"M.BackgroundTransparency=1 M.Size=UDim2.new(1,0,0,150)M.CanvasSize=UDim2.new(0,0,0,0)M.ChildAdded:connect(function(u)if#M:GetChildren()==0 then M.Visible=false else M.Visible=true end end)M.ChildRemoved:connect(function(u)if#M:GetChildren()==0 then M.Visible=false else M.Visible=true end end)x=Y Y:Ready()end x=x.Object.Frame local j=client.UI.Get("\078\111\116\105\102")if j then x.Position=UDim2.new(0,0,0,30)else x.Position=UDim2.new(0,0,0,0)end local k=x:children()Y.Position=UDim2.new(0,0,0,-100)Y.Frame.msg.Text=G local y=Y.Frame.msg.TextBounds.X local function o(u,Y)u=u or 0 local M=#x:children()for G,r in pairs(x:children())do if r~=Y then local Y=(G+u)*28 r.Position=UDim2.new(0,0,0,Y)if G~=M then r.Size=UDim2.new(1,0,0,28)end end end end local f=-1 o(-1)Y.Parent=x if#x:children()>5 then f=-2 end UDim2.new(0,0,0,(#x:children()+f)*28)o(-1)if#x:children()>5 then local u=(x:children())[1]o(-2,u)u:Destroy()end wait(u.Time or 5)if Y and Y.Parent then o(-2,Y)Y:Destroy()end end


return function(data)
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15
	
	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then 
		local holder = service.New("ScreenGui")
		local hTable = client.UI.Register(holder)
		local frame = service.New("ScrollingFrame", holder)
		client.UI.Prepare(holder)
		hTable.Name = "HintHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(1, 0, 0,150)
		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)
		
		container = hTable
		hTable:Ready()
	end
	container = container.Object.Frame
	
	--// First things first account for notif :)
	local notif = client.UI.Get("Notif")
	if notif then
		container.Position = UDim2.new(0,0,0,30)
	else
		container.Position = UDim2.new(0,0,0,0)
	end
	
	local children = container:children()
	
	gui.Position = UDim2.new(0,0,0,-100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X
	
	local function moveGuis(m,ignore)
		m = m or 0
		local max = #container:children()
		for i,v in pairs(container:children()) do
			if v~=ignore then
				local y = (i+m)*28
				v.Position = UDim2.new(0,0,0,y)
				if i~=max then v.Size = UDim2.new(1,0,0,28) end
			end
		end
	end
	
	local lom = -1
	moveGuis(-1)
	gui.Parent = container
	if #container:children()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:children()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:children()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)
	
	if #container:children()>5 then
		local gui = container:children()[1]
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
	
	wait(data.Time or 5)
	
	if gui and gui.Parent then 
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
end
