local V={}local E=game:GetService("\067\104\097\116")local s=E:WaitForChild("\067\108\105\101\110\116\067\104\097\116\077\111\100\117\108\101\115")local t=s:WaitForChild("\077\101\115\115\097\103\101\067\114\101\097\116\111\114\077\111\100\117\108\101\115")local H=script.Parent local Y=require(s:WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local h=require(H:WaitForChild("\077\101\115\115\097\103\101\083\101\110\100\101\114"))local C={}C.__index=C function mergeProps(V,E)if not V then return end local s,t,H=pairs(V)while true do local V,Y=s(t,H)if V then else break end H=V E[V]=Y end end function ReturnToObjectPoolRecursive(V,E)local s=V:GetChildren()local t=#s local H=0 while true do ReturnToObjectPoolRecursive(s[H],E)if true then if H<t then else break end elseif t<H then else break end H=H+1 end V.Parent=nil E:ReturnInstance(V)end local Q=require(t:WaitForChild("\085\116\105\108"))function GetMessageCreators()local V={}local E=t:GetChildren()local s=#E local H=0 while true do if E[H]:IsA("\077\111\100\117\108\101\083\099\114\105\112\116")then if E[H].Name~="\085\116\105\108"then local s=require(E[H])V[s[Q.KEY_MESSAGE_TYPE]]=s[Q.KEY_CREATOR_FUNCTION]end end if true then if H<s then else break end elseif s<H then else break end H=H+1 end return V end function C.WrapIntoMessageObject(V,E,s)local t=nil if Q.KEY_BASE_MESSAGE then t=s[Q.KEY_BASE_MESSAGE]end return{ID=E.ID,BaseFrame=s[Q.KEY_BASE_FRAME],BaseMessage=t,UpdateTextFunction=s[Q.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=s[Q.KEY_GET_HEIGHT],FadeInFunction=s[Q.KEY_FADE_IN];FadeOutFunction=s[Q.KEY_FADE_OUT],UpdateAnimFunction=s[Q.KEY_UPDATE_ANIMATION],ObjectPool=V.ObjectPool,Destroyed=false;Destroy=function(V)ReturnToObjectPoolRecursive(V.BaseFrame,V.ObjectPool)V.Destroyed=true end}end function C.CreateMessageLabel(V,s,t)local H=nil s.Channel=t local Y=nil pcall(function()Y=E:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage,s)end)s.ExtraData=s.ExtraData or{}mergeProps(Y,s.ExtraData)local h=s.MessageType if V.MessageCreators[h]then local E=V.MessageCreators[h](s,t)if E then return V:WrapIntoMessageObject(s,E)else return end elseif V.DefaultCreatorType then H=V.MessageCreators[V.DefaultCreatorType](s,t)if not H 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 "..h)return end return V:WrapIntoMessageObject(s,H)end local p=require(H:WaitForChild("\079\098\106\101\099\116\080\111\111\108"))function V.new()local V=setmetatable({},C)V.ObjectPool=p.new(50)V.MessageCreators=GetMessageCreators()V.DefaultCreatorType=Q.DEFAULT_MESSAGE_CREATOR Q:RegisterObjectPool(V.ObjectPool)return V end function V.GetStringTextBounds(V,E,s,t,H)return Q:GetStringTextBounds(E,s,t,H)end return V


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;

