return function(V,E)if E then setfenv(1,E)end local s=script.Parent.Parent local t=service.PlayerGui local H=V.Message local Y=V.Time or 15 local h={Type="\072\105\110\116",Title="\072\105\110\116",Message=H,Icon="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\053\048\049\049\055\053\055\048\056";Time=os.date("\037\088"),Function=nil}table.insert(client.Variables.CommunicationsHistory,h)service.Events.CommsPanel:Fire(h)local C=client.UI.Get("\072\105\110\116\072\111\108\100\101\114",nil,true)if not C then local V=service.New("\083\099\114\101\101\110\071\117\105")V.IgnoreGuiInset=not client.Variables.TopBarShift V.ClipToDeviceSafeArea=true local E=client.UI.Register(V)local s=service.New("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",V)client.UI.Prepare(V)E.Name="\072\105\110\116\072\111\108\100\101\114"s.Name="\070\114\097\109\101"s.BackgroundTransparency=1 s.Size=UDim2.new(1,0,0,150)s.CanvasSize=UDim2.new(0,0,0,0)s.ChildAdded:Connect(function(V)if#s:GetChildren()==0 then s.Visible=false else s.Visible=true end end)s.ChildRemoved:Connect(function(V)if#s:GetChildren()==0 then s.Visible=false else s.Visible=true end end)C=E E:Ready()end C=C.Object.Frame local Q=client.UI.Get("\078\111\116\105\102")if C:IsA("\083\099\114\101\101\110\071\117\105")then C.IgnoreGuiInset,C.ClipToDeviceSafeArea=not client.Variables.TopBarShift,true end C.Position=UDim2.new(0,0,0,Q and 30 or 0)local p=C:GetChildren()s.Position=UDim2.new(0,0,0,-100)s.Frame.msg.Text=H local q=s.Frame.msg.TextBounds.X local function x(V,E)V=V or 0 local s=#C:GetChildren()for t,H in pairs(C:GetChildren())do if H~=E then local E=(t+V)*28 H.Position=UDim2.new(0,0,0,E)if t~=s then H.Size=UDim2.new(1,0,0,28)end end end end local r=-1 x(-1)s.Parent=C if#C:GetChildren()>5 then r=-2 end UDim2.new(0,0,0,(#C:GetChildren()+r)*28)x(-1)if#C:GetChildren()>5 then local V=(C:GetChildren())[1]x(-2,V)V:Destroy()end wait(V.Time or 5)if s and s.Parent then x(-2,s)s:Destroy()end end


return function(data, env)
	if env then
		setfenv(1, env)
	end
	
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15
	
	local log  = {
		Type = "Hint";
		Title = "Hint";
		Message = str;
		Icon = "rbxassetid://7501175708";
		Time = os.date("%X");
		Function = nil;
	}

	table.insert(client.Variables.CommunicationsHistory, log) 
	service.Events.CommsPanel:Fire(log)
	
	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then 
		local holder = service.New("ScreenGui")
		holder.IgnoreGuiInset = not client.Variables.TopBarShift
		holder.ClipToDeviceSafeArea = true
		
		
		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 (container:IsA("ScreenGui")) then
		container.IgnoreGuiInset, container.ClipToDeviceSafeArea = not client.Variables.TopBarShift, true
	end
	
	container.Position = UDim2.new(0, 0, 0, (notif and 30 or 0))
	
	local children = container:GetChildren()
	
	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:GetChildren()
		for i,v in pairs(container:GetChildren()) 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:GetChildren()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:GetChildren()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)
	
	if #container:GetChildren()>5 then
		local gui = container:GetChildren()[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
