local g={}local e=game:GetService("\067\104\097\116")local V=e:WaitForChild("\067\108\105\101\110\116\067\104\097\116\077\111\100\117\108\101\115")local y=V:WaitForChild("\077\101\115\115\097\103\101\067\114\101\097\116\111\114\077\111\100\117\108\101\115")local b=script.Parent local p=require(V:WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local M=require(b:WaitForChild("\077\101\115\115\097\103\101\083\101\110\100\101\114"))local E={}E.__index=E function mergeProps(g,e)if not g then return end local V,y,b=pairs(g)while true do local g,p=V(y,b)if g then else break end b=g e[g]=p end end function ReturnToObjectPoolRecursive(g,e)local V=g:GetChildren()local y=#V local b=0 while true do ReturnToObjectPoolRecursive(V[b],e)if true then if b<y then else break end elseif y<b then else break end b=b+1 end g.Parent=nil e:ReturnInstance(g)end local u=require(y:WaitForChild("\085\116\105\108"))function GetMessageCreators()local g={}local e=y:GetChildren()local V=#e local b=0 while true do if e[b]:IsA("\077\111\100\117\108\101\083\099\114\105\112\116")then if e[b].Name~="\085\116\105\108"then local V=require(e[b])g[V[u.KEY_MESSAGE_TYPE]]=V[u.KEY_CREATOR_FUNCTION]end end if true then if b<V then else break end elseif V<b then else break end b=b+1 end return g end function E.WrapIntoMessageObject(g,e,V)local y=nil if u.KEY_BASE_MESSAGE then y=V[u.KEY_BASE_MESSAGE]end return{ID=e.ID;BaseFrame=V[u.KEY_BASE_FRAME],BaseMessage=y,UpdateTextFunction=V[u.KEY_UPDATE_TEXT_FUNC]or function()warn("\078\079 \077\069\083\083\065\071\069 \082\069\083\073\090\069 \070\085\078\067\084\073\079\078")end,GetHeightFunction=V[u.KEY_GET_HEIGHT];FadeInFunction=V[u.KEY_FADE_IN];FadeOutFunction=V[u.KEY_FADE_OUT],UpdateAnimFunction=V[u.KEY_UPDATE_ANIMATION];ObjectPool=g.ObjectPool;Destroyed=false;Destroy=function(g)ReturnToObjectPoolRecursive(g.BaseFrame,g.ObjectPool)g.Destroyed=true end}end function E.CreateMessageLabel(g,V,y)local b=nil V.Channel=y local p=nil pcall(function()p=e:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage,V)end)V.ExtraData=V.ExtraData or{}mergeProps(p,V.ExtraData)local M=V.MessageType if g.MessageCreators[M]then local e=g.MessageCreators[M](V,y)if e then return g:WrapIntoMessageObject(V,e)else return end elseif g.DefaultCreatorType then b=g.MessageCreators[g.DefaultCreatorType](V,y)if not b then return end else error("\078\111 \109\101\115\115\097\103\101 \099\114\101\097\116\111\114 \097\118\097\105\108\097\098\108\101 \102\111\114 \109\101\115\115\097\103\101 \116\121\112\101\058 "..M)return end return g:WrapIntoMessageObject(V,b)end local I=require(b:WaitForChild("\079\098\106\101\099\116\080\111\111\108"))function g.new()local g=setmetatable({},E)g.ObjectPool=I.new(50)g.MessageCreators=GetMessageCreators()g.DefaultCreatorType=u.DEFAULT_MESSAGE_CREATOR u:RegisterObjectPool(g.ObjectPool)return g end function g.GetStringTextBounds(g,e,V,y,b)return u:GetStringTextBounds(e,V,y,b)end return g
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {}
local l__Chat__2 = game:GetService("Chat")
local l__ClientChatModules__3 = l__Chat__2:WaitForChild("ClientChatModules")
local l__MessageCreatorModules__4 = l__ClientChatModules__3:WaitForChild("MessageCreatorModules")
local l__Parent__5 = script.Parent
local v6 = require(l__ClientChatModules__3:WaitForChild("ChatSettings"))
local v7 = require(l__Parent__5:WaitForChild("MessageSender"))
local v8 = {}
v8.__index = v8
function mergeProps(p1, p2)
	if not p1 then
		return
	end
	local v9, v10, v11 = pairs(p1)
	while true do
		local v12, v13 = v9(v10, v11)
		if v12 then
		else
			break
		end
		v11 = v12
		p2[v12] = v13
	end
end
function ReturnToObjectPoolRecursive(p3, p4)
	local v14 = p3:GetChildren()
	local v15 = #v14
	local v16 = 1 - 1
	while true do
		ReturnToObjectPoolRecursive(v14[v16], p4)
		if 0 <= 1 then
			if v16 < v15 then
			else
				break
			end
		elseif v15 < v16 then
		else
			break
		end
		v16 = v16 + 1
	end
	p3.Parent = nil
	p4:ReturnInstance(p3)
end
local u1 = require(l__MessageCreatorModules__4:WaitForChild("Util"))
function GetMessageCreators()
	local v17 = {}
	local v18 = l__MessageCreatorModules__4:GetChildren()
	local v19 = #v18
	local v20 = 1 - 1
	while true do
		if v18[v20]:IsA("ModuleScript") then
			if v18[v20].Name ~= "Util" then
				local v21 = require(v18[v20])
				v17[v21[u1.KEY_MESSAGE_TYPE]] = v21[u1.KEY_CREATOR_FUNCTION]
			end
		end
		if 0 <= 1 then
			if v20 < v19 then
			else
				break
			end
		elseif v19 < v20 then
		else
			break
		end
		v20 = v20 + 1
	end
	return v17
end
function v8.WrapIntoMessageObject(p5, p6, p7)
	local v22 = nil
	if u1.KEY_BASE_MESSAGE then
		v22 = p7[u1.KEY_BASE_MESSAGE]
	end
	return {
		ID = p6.ID,
		BaseFrame = p7[u1.KEY_BASE_FRAME],
		BaseMessage = v22,
		UpdateTextFunction = p7[u1.KEY_UPDATE_TEXT_FUNC] or function()
			warn("NO MESSAGE RESIZE FUNCTION")
		end,
		GetHeightFunction = p7[u1.KEY_GET_HEIGHT],
		FadeInFunction = p7[u1.KEY_FADE_IN],
		FadeOutFunction = p7[u1.KEY_FADE_OUT],
		UpdateAnimFunction = p7[u1.KEY_UPDATE_ANIMATION],
		ObjectPool = p5.ObjectPool,
		Destroyed = false,
		Destroy = function(p8)
			ReturnToObjectPoolRecursive(p8.BaseFrame, p8.ObjectPool)
			p8.Destroyed = true
		end,
	}
end
function v8.CreateMessageLabel(p9, p10, p11)
	local v23 = nil
	p10.Channel = p11
	local u2 = nil
	pcall(function()
		u2 = l__Chat__2:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage, p10)
	end)
	p10.ExtraData = p10.ExtraData or {}
	mergeProps(u2, p10.ExtraData)
	local l__MessageType__24 = p10.MessageType
	if p9.MessageCreators[l__MessageType__24] then
		local v25 = p9.MessageCreators[l__MessageType__24](p10, p11)
		if v25 then
			return p9:WrapIntoMessageObject(p10, v25)
		else
			return
		end
	elseif p9.DefaultCreatorType then
		v23 = p9.MessageCreators[p9.DefaultCreatorType](p10, p11)
		if not v23 then
			return
		end
	else
		error("No message creator available for message type: " .. l__MessageType__24)
		return
	end
	return p9:WrapIntoMessageObject(p10, v23)
end
local u3 = require(l__Parent__5:WaitForChild("ObjectPool"))
function v1.new()
	local v26 = setmetatable({}, v8)
	v26.ObjectPool = u3.new(50)
	v26.MessageCreators = GetMessageCreators()
	v26.DefaultCreatorType = u1.DEFAULT_MESSAGE_CREATOR
	u1:RegisterObjectPool(v26.ObjectPool)
	return v26
end
function v1.GetStringTextBounds(p12, p13, p14, p15, p16)
	return u1:GetStringTextBounds(p13, p14, p15, p16)
end
return v1
