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

	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
