function module.new(J,Y)local U=setmetatable({},methods)U.GuiObject=nil U.ChatBarParentFrame=nil U.TextBox=nil U.TextLabel=nil U.GuiObjects={}U.eGuiObjectsChanged=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")U.GuiObjectsChanged=U.eGuiObjectsChanged.Event U.TextBoxConnections={}U.InCustomState=false U.CustomState=nil U.TargetChannel=nil U.CommandProcessor=J U.ChatWindow=Y U.TweenPixelsPerSecond=500 U.TargetYSize=0 U.AnimParams={}U.CalculatingSizeLock=false U.ChannelNameColors={}U.UserHasChatOff=false U:InitializeAnimParams()ChatSettings.SettingsChanged:connect(function(J,Y)if J=="\067\104\097\116\066\097\114\084\101\120\116\083\105\122\101"then U:SetTextSize(Y)end end);(coroutine.wrap(function()local J,Y=pcall(function()return Chat:CanUserChatAsync(LocalPlayer.UserId)end)local u=J and(RunService:IsStudio()or Y)if u==false then U.UserHasChatOff=true U:DoLockChatBar()end end))()return U end return module
--///////////////////////// Constructors
--//////////////////////////////////////

function module.new(CommandProcessor, ChatWindow)
	local obj = setmetatable({}, methods)

	obj.GuiObject = nil
	obj.ChatBarParentFrame = nil
	obj.TextBox = nil
	obj.TextLabel = nil
	obj.GuiObjects = {}
	obj.eGuiObjectsChanged = Instance.new("BindableEvent")
	obj.GuiObjectsChanged = obj.eGuiObjectsChanged.Event
	obj.TextBoxConnections = {}

	obj.InCustomState = false
	obj.CustomState = nil

	obj.TargetChannel = nil
	obj.CommandProcessor = CommandProcessor
	obj.ChatWindow = ChatWindow

	obj.TweenPixelsPerSecond = 500
	obj.TargetYSize = 0

	obj.AnimParams = {}
	obj.CalculatingSizeLock = false

	obj.ChannelNameColors = {}

	obj.UserHasChatOff = false

	obj:InitializeAnimParams()

	ChatSettings.SettingsChanged:connect(function(setting, value)
		if setting == "ChatBarTextSize" then
			obj:SetTextSize(value)
		end
	end)

	coroutine.wrap(function()
		local success, canLocalUserChat = pcall(function()
			return Chat:CanUserChatAsync(LocalPlayer.UserId)
		end)
		local canChat = success and (RunService:IsStudio() or canLocalUserChat)
		if canChat == false then
			obj.UserHasChatOff = true
			obj:DoLockChatBar()
		end
	end)()

	return obj
end

return module
