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


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
