function methods.CreateFadeFunctions(E,i)local J={}for i,E in pairs(i)do J[i]={}for E,e in pairs(E)do J[i][E]={Target=e.FadedIn;Current=i[E],NormalizedExptValue=1}end end local function e(E,e)for J,m in pairs(J)do for m,O in pairs(m)do O.Target=i[J][m].FadedIn O.NormalizedExptValue=e:NormalizedDefaultExptValueInSeconds(E)end end end local function m(E,e)for J,m in pairs(J)do for m,O in pairs(m)do O.Target=i[J][m].FadedOut O.NormalizedExptValue=e:NormalizedDefaultExptValueInSeconds(E)end end end local function O()for i,E in pairs(J)do for E,J in pairs(E)do i[E]=J.Current end end end local function K(i,E)for J,e in pairs(J)do for J,e in pairs(e)do e.Current=E:Expt(e.Current,e.Target,e.NormalizedExptValue,i)end end O()end return e,m,K end function methods.NewBindableEvent(E,i)local J=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")J.Name=i return J end function module.new()local i=setmetatable({},methods)i.ObjectPool=nil i.ChatWindow=nil i.DEFAULT_MESSAGE_CREATOR=DEFAULT_MESSAGE_CREATOR i.MESSAGE_CREATOR_MODULES_VERSION=MESSAGE_CREATOR_MODULES_VERSION i.KEY_MESSAGE_TYPE=KEY_MESSAGE_TYPE i.KEY_CREATOR_FUNCTION=KEY_CREATOR_FUNCTION i.KEY_BASE_FRAME=KEY_BASE_FRAME i.KEY_BASE_MESSAGE=KEY_BASE_MESSAGE i.KEY_UPDATE_TEXT_FUNC=KEY_UPDATE_TEXT_FUNC i.KEY_GET_HEIGHT=KEY_GET_HEIGHT i.KEY_FADE_IN=KEY_FADE_IN i.KEY_FADE_OUT=KEY_FADE_OUT i.KEY_UPDATE_ANIMATION=KEY_UPDATE_ANIMATION return i end return module.new()

function methods:CreateFadeFunctions(fadeObjects)
	local AnimParams = {}
	for object, properties in pairs(fadeObjects) do
		AnimParams[object] = {}
		for property, values in pairs(properties) do
			AnimParams[object][property] = {
				Target = values.FadedIn,
				Current = object[property],
				NormalizedExptValue = 1,
			}
		end
	end

	local function FadeInFunction(duration, CurveUtil)
		for object, properties in pairs(AnimParams) do
			for property, values in pairs(properties) do
				values.Target = fadeObjects[object][property].FadedIn
				values.NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
			end
		end
	end

	local function FadeOutFunction(duration, CurveUtil)
		for object, properties in pairs(AnimParams) do
			for property, values in pairs(properties) do
				values.Target = fadeObjects[object][property].FadedOut
				values.NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
			end
		end
	end

	local function AnimGuiObjects()
		for object, properties in pairs(AnimParams) do
			for property, values in pairs(properties) do
				object[property] = values.Current
			end
		end
	end

	local function UpdateAnimFunction(dtScale, CurveUtil)
		for object, properties in pairs(AnimParams) do
			for property, values in pairs(properties) do
				values.Current = CurveUtil:Expt(
					values.Current,
					values.Target,
					values.NormalizedExptValue,
					dtScale
				)
			end
		end

		AnimGuiObjects()
	end

	return FadeInFunction, FadeOutFunction, UpdateAnimFunction
end

function methods:NewBindableEvent(name)
	local bindable = Instance.new("BindableEvent")
	bindable.Name = name
	return bindable
end

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

	obj.ObjectPool = nil
	obj.ChatWindow = nil

	obj.DEFAULT_MESSAGE_CREATOR = DEFAULT_MESSAGE_CREATOR
	obj.MESSAGE_CREATOR_MODULES_VERSION = MESSAGE_CREATOR_MODULES_VERSION

	obj.KEY_MESSAGE_TYPE = KEY_MESSAGE_TYPE
	obj.KEY_CREATOR_FUNCTION = KEY_CREATOR_FUNCTION

	obj.KEY_BASE_FRAME = KEY_BASE_FRAME
	obj.KEY_BASE_MESSAGE = KEY_BASE_MESSAGE
	obj.KEY_UPDATE_TEXT_FUNC = KEY_UPDATE_TEXT_FUNC
	obj.KEY_GET_HEIGHT = KEY_GET_HEIGHT
	obj.KEY_FADE_IN = KEY_FADE_IN
	obj.KEY_FADE_OUT = KEY_FADE_OUT
	obj.KEY_UPDATE_ANIMATION = KEY_UPDATE_ANIMATION

	return obj
end

return module.new()
