return function(U)local Z=script.Parent.Parent local f=service.PlayerGui local Q=U.Message local K=U.Time or 15 local G=client.UI.Get("\072\105\110\116\072\111\108\100\101\114",nil,true)if not G then local U=service.New("\083\099\114\101\101\110\071\117\105")local Z=client.UI.Register(U)local f=service.New("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",U)client.UI.Prepare(U)Z.Name="\072\105\110\116\072\111\108\100\101\114"f.Name="\070\114\097\109\101"f.BackgroundTransparency=1 f.Size=UDim2.new(1,0,0,150)f.CanvasSize=UDim2.new(0,0,0,0)f.ChildAdded:Connect(function(U)if#f:GetChildren()==0 then f.Visible=false else f.Visible=true end end)f.ChildRemoved:Connect(function(U)if#f:GetChildren()==0 then f.Visible=false else f.Visible=true end end)G=Z Z:Ready()end G=G.Object.Frame local w=client.UI.Get("\078\111\116\105\102")local r=client.UI.Get("\084\111\112\066\097\114")G.Position=UDim2.new(0,0,0,((w and 30 or 0)+(r and 40 or 0))-35)local F=G:children()Z.Position=UDim2.new(0,0,0,-100)Z.Frame.msg.Text=Q local c=Z.Frame.msg.TextBounds.X spawn(function()local U=Instance.new("\083\111\117\110\100",service.LocalContainer())U.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\052\056\057\051\057\048\048\055\050"wait(.1)U:Play()wait(.8)U:Destroy()end)local function N(U,Z)U=U or 0 local f=#G:children()for Q,K in pairs(G:children())do if K~=Z then local Z=(Q+U)*28 K.Position=UDim2.new(0,0,0,Z)if Q~=f then K.Size=UDim2.new(1,0,0,28)end end end end local D=-1 N(-1)Z.Parent=G if#G:children()>5 then D=-2 end UDim2.new(0,0,0,(#G:children()+D)*28)N(-1)if#G:children()>5 then local U=(G:children())[1]N(-2,U)U:Destroy()end wait(U.Time or 5)if Z and Z.Parent then N(-2,Z)Z: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")
	local topbar = client.UI.Get("TopBar")

	container.Position = UDim2.new(0, 0, 0, ((notif and 30) or 0) + ((topbar and 40) or 0) - 35)

	local children = container:children()

	gui.Position = UDim2.new(0, 0, 0, -100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X

	spawn(function()
		local sound = Instance.new("Sound", service.LocalContainer())
		sound.SoundId = "rbxassetid://489390072"
		wait(0.1)
		sound:Play()
		wait(0.8)
		sound:Destroy()
	end)

	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
