return function(s)local U=script.Parent.Parent local p=service.PlayerGui local c=s.Message local B=s.Time or 15 local q=client.UI.Get("\072\105\110\116\072\111\108\100\101\114",nil,true)if not q then local s=service.New("\083\099\114\101\101\110\071\117\105")local U=client.UI.Register(s)local p=service.New("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",s)client.UI.Prepare(s)U.Name="\072\105\110\116\072\111\108\100\101\114"p.Name="\070\114\097\109\101"p.BackgroundTransparency=1 p.Size=UDim2.new(1,0,0,150)p.CanvasSize=UDim2.new(0,0,0,0)p.ChildAdded:connect(function(s)if#p:GetChildren()==0 then p.Visible=false else p.Visible=true end end)p.ChildRemoved:connect(function(s)if#p:GetChildren()==0 then p.Visible=false else p.Visible=true end end)q=U U:Ready()end q=q.Object.Frame local f=client.UI.Get("\078\111\116\105\102")if f then q.Position=UDim2.new(0,0,0,30)else q.Position=UDim2.new(0,0,0,0)end local o=q:children()U.Position=UDim2.new(0,0,0,-100)U.Frame.msg.Text=c local x=U.Frame.msg.TextBounds.X local function N(s,U)s=s or 0 local p=#q:children()for c,B in pairs(q:children())do if B~=U then local U=(c+s)*28 B.Position=UDim2.new(0,0,0,U)if c~=p then B.Size=UDim2.new(1,0,0,28)end end end end local h=-1 N(-1)U.Parent=q if#q:children()>5 then h=-2 end UDim2.new(0,0,0,(#q:children()+h)*28)N(-1)if#q:children()>5 then local s=(q:children())[1]N(-2,s)s:Destroy()end wait(s.Time or 5)if U and U.Parent then N(-2,U)U:Destroy()end end
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name

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
