local function S(S,a)return function(j)return S:Lerp(a,j)end end local function a(S,a,j)return S+j*(a-S)end local function j(S,a)return S.Time<a.Time end local function u(S,a)local j,u,P local V,C,p=S.R,S.G,S.B V=V<.040448236277108 and V/12.92 or.87941546140213*(V+.055)^2.4 C=C<.040448236277108 and C/12.92 or.87941546140213*(C+.055)^2.4 p=p<.040448236277108 and p/12.92 or.87941546140213*(p+.055)^2.4 local U=(.2125862307856*V+.71517030370341*C)+.072200498643336*p local D=(3.6590806972266*V+11.442689580057*C)+4.1149915024265*p local e=U>.0088564516790356 and 116*U^.33333333333333-16 or 903.2962962963*U if D>1e-15 then local S=(.92570639729519*V-.83337363237799*C)-.092098206660859*p j,u,P=e,(e*S)/D,e*((9*U)/D-.46832)else j,u,P=e,-0.19783*e,-0.46832*e end local b,Z,O local n,Y,s=a.R,a.G,a.B n=n<.040448236277108 and n/12.92 or.87941546140213*(n+.055)^2.4 Y=Y<.040448236277108 and Y/12.92 or.87941546140213*(Y+.055)^2.4 s=s<.040448236277108 and s/12.92 or.87941546140213*(s+.055)^2.4 local l=(.2125862307856*n+.71517030370341*Y)+.072200498643336*s local X=(3.6590806972266*n+11.442689580057*Y)+4.1149915024265*s local A=l>.0088564516790356 and 116*l^.33333333333333-16 or 903.2962962963*l if X>1e-15 then local S=(.92570639729519*n-.83337363237799*Y)-.092098206660859*s b,Z,O=A,(A*S)/X,A*((9*l)/X-.46832)else b,Z,O=A,-0.19783*A,-0.46832*A end return function(S)local a=(1-S)*j+S*b if a<.0197955 then return BLACK_COLOR3 end local V=((1-S)*u+S*Z)/a+.19783 local C=((1-S)*P+S*O)/a+.46832 local p=(a+16)/116 p=p>.20689655172414 and(p*p)*p or.12841854934602*p-.017712903358071 local U=(p*V)/C local D=p*((3-.75*V)/C-5)local e=(7.2914074*U-1.537208*p)-.4986286*D local n=(-2.180094*U+1.8757561*p)+.0415175*D local Y=(.1253477*U-.2040211*p)+1.0569959*D if e<0 and(e<n and e<Y)then e,n,Y=0,n-e,Y-e elseif n<0 and n<Y then e,n,Y=e-n,0,Y-n elseif Y<0 then e,n,Y=e-Y,n-Y,0 end e=e<.0031306684425 and 12.92*e or 1.055*e^.41666666666667-.055 n=n<.0031306684425 and 12.92*n or 1.055*n^.41666666666667-.055 Y=Y<.0031306684425 and 12.92*Y or 1.055*Y^.41666666666667-.055 e=e>1 and 1 or e<0 and 0 or e n=n>1 and 1 or n<0 and 0 or n Y=Y>1 and 1 or Y<0 and 0 or Y return Color3.new(e,n,Y)end end local P=setmetatable({boolean=function(S,a)return function(j)if j<.5 then return S else return a end end end;number=function(S,a)local j=a-S return function(a)return S+j*a end end;string=function(S,a)local j=false local u,P do local V,C,p,U=string.match(S,"\094\040\091\043-\093\063\041\040\037\100\042\041\058\091\043-\093\063\040\037\100\042\041\058\091\043-\093\063\040\037\100\042\041\036")local D,e,b,Z=string.match(a,"\094\040\091\043-\093\063\041\040\037\100\042\041\058\091\043-\093\063\040\037\100\042\041\058\091\043-\093\063\040\037\100\042\041\036")if V and D then u=(3600*(tonumber(C)or 0)+60*(tonumber(p)or 0))+(tonumber(U)or 0)local S=(3600*(tonumber(e)or 0)+60*(tonumber(b)or 0))+(tonumber(Z)or 0)if V=="-"then u=-u end P=((43200+(D~="-"and S or-S))-u)%86400-43200 else j=true end end if j then local S=#a return function(j)j=1+S*j return string.sub(a,1,j<S and j or S)end else return function(S)local a=(u+P*S)%86400 local j=math.abs(a)return string.format(a<0 and"-\037\046\050\117\058\037\046\050\117\058\037\046\050\117"or"\037\046\050\117\058\037\046\050\117\058\037\046\050\117",(j-j%3600)/3600,(j%3600-j%60)/60,j%60)end end end,CFrame=S;Color3=u,NumberRange=function(S,a)local j,u=S.Min,S.Max local P,V=a.Min-j,a.Max-u return function(S)return NumberRange.new(j+S*P,u+S*V)end end;NumberSequenceKeypoint=function(S,a)local j,u,P=S.Time,S.Value,S.Envelope local V,C,p=a.Time-j,a.Value-u,a.Envelope-P return function(S)return NumberSequenceKeypoint.new(j+S*V,u+S*C,P+S*p)end end,PhysicalProperties=function(S,a)local j,u,P,V,C=S.Density,S.Elasticity,S.ElasticityWeight,S.Friction,S.FrictionWeight local p,U,D,e,b=a.Density-j,a.Elasticity-u,a.ElasticityWeight-P,a.Friction-V,a.FrictionWeight-C return function(S)return PhysicalProperties.new(j+S*p,u+S*U,P+S*D,V+S*e,C+S*b)end end,Ray=function(S,a)local j,u,P,V=S.Origin,S.Direction,a.Origin,a.Direction local C,p,U,D,e,b=j.X,j.Y,j.Z,u.X,u.Y,u.Z local Z,O,n,Y,s,l=P.X-C,P.Y-p,P.Z-U,V.X-D,V.Y-e,V.Z-b return function(S)return Ray.new(Vector3.new(C+S*Z,p+S*O,U+S*n),Vector3.new(D+S*Y,e+S*s,b+S*l))end end;UDim=function(S,a)local j,u=S.Scale,S.Offset local P,V=a.Scale-j,a.Offset-u return function(S)return UDim.new(j+S*P,u+S*V)end end;UDim2=S,Vector2=S;Vector3=S;Rect=function(S,a)return function(j)return Rect.new(S.Min.X+j*(a.Min.X-S.Min.X),S.Min.Y+j*(a.Min.Y-S.Min.Y),S.Max.X+j*(a.Max.X-S.Max.X),S.Max.Y+j*(a.Max.Y-S.Max.Y))end end,Region3=function(S,j)return function(u)local P=a(S.CFrame*(-S.Size/2),j.CFrame*(-j.Size/2),u)local V=a(S.CFrame*(S.Size/2),j.CFrame*(j.Size/2),u)local C=P.X local p=V.X local U=P.Y local D=V.Y local e=P.Z local b=V.Z return Region3.new(Vector3.new(C<p and C or p,U<D and U or D,e<b and e or b),Vector3.new(C>p and C or p,U>D and U or D,e>b and e or b))end end,NumberSequence=function(S,a)return function(u)local P={}local V={}local C=0 for S,j in ipairs(S.Keypoints)do local p,U for S,a in ipairs(a.Keypoints)do if a.Time==j.Time then p,U=a,a break elseif a.Time<j.Time and(U==nil or a.Time>U.Time)then U=a elseif a.Time>j.Time and(p==nil or a.Time<p.Time)then p=a end end local D,e if p==U then D,e=p.Value,p.Envelope else local S=(j.Time-U.Time)/(p.Time-U.Time)D=(p.Value-U.Value)*S+U.Value e=(p.Envelope-U.Envelope)*S+U.Envelope end C+=1 P[C]=NumberSequenceKeypoint.new(j.Time,(D-j.Value)*u+j.Value,(e-j.Envelope)*u+j.Envelope)V[j.Time]=true end for a,j in ipairs(a.Keypoints)do if not V[j.Time]then local a,V for S,u in ipairs(S.Keypoints)do if u.Time==j.Time then a,V=u,u break elseif u.Time<j.Time and(V==nil or u.Time>V.Time)then V=u elseif u.Time>j.Time and(a==nil or u.Time<a.Time)then a=u end end local p,U if a==V then p,U=a.Value,a.Envelope else local S=(j.Time-V.Time)/(a.Time-V.Time)p=(a.Value-V.Value)*S+V.Value U=(a.Envelope-V.Envelope)*S+V.Envelope end C+=1 P[C]=NumberSequenceKeypoint.new(j.Time,(j.Value-p)*u+p,(j.Envelope-U)*u+U)end end table.sort(P,j)return NumberSequence.new(P)end end,ColorSequence=function(S,a)return function(P)local V={}local C={}local p=0 for S,j in ipairs(S.Keypoints)do local U,D for S,a in ipairs(a.Keypoints)do if a.Time==j.Time then U,D=a,a break elseif a.Time<j.Time and(D==nil or a.Time>D.Time)then D=a elseif a.Time>j.Time and(U==nil or a.Time<U.Time)then U=a end end local e if U==D then e=U.Value else e=(u(D.Value,U.Value))((j.Time-D.Time)/(U.Time-D.Time))end p+=1 V[p]=ColorSequenceKeypoint.new(j.Time,(u(j.Value,e))(P))C[j.Time]=true end for a,j in ipairs(a.Keypoints)do if not C[j.Time]then local a,C for S,u in ipairs(S.Keypoints)do if u.Time==j.Time then a,C=u,u break elseif u.Time<j.Time and(C==nil or u.Time>C.Time)then C=u elseif u.Time>j.Time and(a==nil or u.Time<a.Time)then a=u end end local U if a==C then U=a.Value else U=(u(C.Value,a.Value))((j.Time-C.Time)/(a.Time-C.Time))end p+=1 V[p]=ColorSequenceKeypoint.new(j.Time,(u(j.Value,U))(P))end end table.sort(V,j)return ColorSequence.new(V)end end},{__index=function(S,a)error("\078\111 \108\101\114\112 \102\117\110\099\116\105\111\110 \105\115 \100\101\102\105\110\101\100 \102\111\114 \116\121\112\101 "..(tostring(a).."\046"),4)end,__newindex=function(S,a)error("\078\111 \108\101\114\112 \102\117\110\099\116\105\111\110 \105\115 \100\101\102\105\110\101\100 \102\111\114 \116\121\112\101 "..(tostring(a).."\046"),4)end})return P

local function RobloxLerp(V0, V1)
	return function(Alpha)
		return V0:Lerp(V1, Alpha)
	end
end

local function Lerp(Start, Finish, Alpha)
	return Start + Alpha * (Finish - Start)
end

local function SortByTime(A, B)
	return A.Time < B.Time
end

local function Color3Lerp(C0, C1)
	local L0, U0, V0
	local R0, G0, B0 = C0.R, C0.G, C0.B
	R0 = R0 < 0.0404482362771076 and R0 / 12.92 or 0.87941546140213 * (R0 + 0.055) ^ 2.4
	G0 = G0 < 0.0404482362771076 and G0 / 12.92 or 0.87941546140213 * (G0 + 0.055) ^ 2.4
	B0 = B0 < 0.0404482362771076 and B0 / 12.92 or 0.87941546140213 * (B0 + 0.055) ^ 2.4

	local Y0 = 0.2125862307855956 * R0 + 0.71517030370341085 * G0 + 0.0722004986433362 * B0
	local Z0 = 3.6590806972265883 * R0 + 11.4426895800574232 * G0 + 4.1149915024264843 * B0
	local _L0 = Y0 > 0.008856451679035631 and 116 * Y0 ^ (1 / 3) - 16 or 903.296296296296 * Y0

	if Z0 > 1E-15 then
		local X = 0.9257063972951867 * R0 - 0.8333736323779866 * G0 - 0.09209820666085898 * B0
		L0, U0, V0 = _L0, _L0 * X / Z0, _L0 * (9 * Y0 / Z0 - 0.46832)
	else
		L0, U0, V0 = _L0, -0.19783 * _L0, -0.46832 * _L0
	end

	local L1, U1, V1
	local R1, G1, B1 = C1.R, C1.G, C1.B
	R1 = R1 < 0.0404482362771076 and R1 / 12.92 or 0.87941546140213 * (R1 + 0.055) ^ 2.4
	G1 = G1 < 0.0404482362771076 and G1 / 12.92 or 0.87941546140213 * (G1 + 0.055) ^ 2.4
	B1 = B1 < 0.0404482362771076 and B1 / 12.92 or 0.87941546140213 * (B1 + 0.055) ^ 2.4

	local Y1 = 0.2125862307855956 * R1 + 0.71517030370341085 * G1 + 0.0722004986433362 * B1
	local Z1 = 3.6590806972265883 * R1 + 11.4426895800574232 * G1 + 4.1149915024264843 * B1
	local _L1 = Y1 > 0.008856451679035631 and 116 * Y1 ^ (1 / 3) - 16 or 903.296296296296 * Y1

	if Z1 > 1E-15 then
		local X = 0.9257063972951867 * R1 - 0.8333736323779866 * G1 - 0.09209820666085898 * B1
		L1, U1, V1 = _L1, _L1 * X / Z1, _L1 * (9 * Y1 / Z1 - 0.46832)
	else
		L1, U1, V1 = _L1, -0.19783 * _L1, -0.46832 * _L1
	end

	return function(Alpha)
		local L = (1 - Alpha) * L0 + Alpha * L1
		if L < 0.0197955 then
			return BLACK_COLOR3
		end

		local U = ((1 - Alpha) * U0 + Alpha * U1) / L + 0.19783
		local V = ((1 - Alpha) * V0 + Alpha * V1) / L + 0.46832

		local Y = (L + 16) / 116
		Y = Y > 0.206896551724137931 and Y * Y * Y or 0.12841854934601665 * Y - 0.01771290335807126
		local X = Y * U / V
		local Z = Y * ((3 - 0.75 * U) / V - 5)

		local R = 7.2914074 * X - 1.5372080 * Y - 0.4986286 * Z
		local G = -2.1800940 * X + 1.8757561 * Y + 0.0415175 * Z
		local B = 0.1253477 * X - 0.2040211 * Y + 1.0569959 * Z

		if R < 0 and R < G and R < B then
			R, G, B = 0, G - R, B - R
		elseif G < 0 and G < B then
			R, G, B = R - G, 0, B - G
		elseif B < 0 then
			R, G, B = R - B, G - B, 0
		end

		R = R < 3.1306684425E-3 and 12.92 * R or 1.055 * R ^ (1 / 2.4) - 0.055 -- 3.1306684425E-3
		G = G < 3.1306684425E-3 and 12.92 * G or 1.055 * G ^ (1 / 2.4) - 0.055
		B = B < 3.1306684425E-3 and 12.92 * B or 1.055 * B ^ (1 / 2.4) - 0.055

		R = R > 1 and 1 or R < 0 and 0 or R
		G = G > 1 and 1 or G < 0 and 0 or G
		B = B > 1 and 1 or B < 0 and 0 or B

		return Color3.new(R, G, B)
	end
end

local Lerps = setmetatable({
	boolean = function(V0, V1)
		return function(Alpha)
			if Alpha < 0.5 then
				return V0
			else
				return V1
			end
		end
	end;

	number = function(V0, V1)
		local Delta = V1 - V0
		return function(Alpha)
			return V0 + Delta * Alpha
		end
	end;

	string = function(V0, V1)
		local RegularString = false

		local N0, D do
			local Sign0, H0, M0, S0 = string.match(V0, "^([+-]?)(%d*):[+-]?(%d*):[+-]?(%d*)$")
			local Sign1, H1, M1, S1 = string.match(V1, "^([+-]?)(%d*):[+-]?(%d*):[+-]?(%d*)$")
			if Sign0 and Sign1 then
				N0 = 3600 * (tonumber(H0) or 0) + 60 * (tonumber(M0) or 0) + (tonumber(S0) or 0)
				local N1 = 3600 * (tonumber(H1) or 0) + 60 * (tonumber(M1) or 0) + (tonumber(S1) or 0)
				if Sign0 == "-" then
					N0 = -N0
				end

				D = (43200 + (Sign1 ~= "-" and N1 or -N1) - N0) % 86400 - 43200
			else
				RegularString = true
			end
		end

		if RegularString then
			local Length = #V1
			return function(Alpha)
				Alpha = 1 + Length * Alpha
				return string.sub(V1, 1, Alpha < Length and Alpha or Length)
			end
		else
			return function(Alpha)
				local FS = (N0 + D * Alpha) % 86400
				local S = math.abs(FS)
				return string.format(
					FS < 0 and "-%.2u:%.2u:%.2u" or "%.2u:%.2u:%.2u",
					(S - S % 3600) / 3600,
					(S % 3600 - S % 60) / 60,
					S % 60
				)
			end
		end
	end;

	CFrame = RobloxLerp;
	Color3 = Color3Lerp;
	NumberRange = function(V0, V1)
		local Min0, Max0 = V0.Min, V0.Max
		local DeltaMin, DeltaMax = V1.Min - Min0, V1.Max - Max0

		return function(Alpha)
			return NumberRange.new(Min0 + Alpha * DeltaMin, Max0 + Alpha * DeltaMax)
		end
	end;

	NumberSequenceKeypoint = function(V0, V1)
		local T0, Value0, E0 = V0.Time, V0.Value, V0.Envelope
		local DT, DV, DE = V1.Time - T0, V1.Value - Value0, V1.Envelope - E0

		return function(Alpha)
			return NumberSequenceKeypoint.new(T0 + Alpha * DT, Value0 + Alpha * DV, E0 + Alpha * DE)
		end
	end;

	PhysicalProperties = function(V0, V1)
		local D0, E0, EW0, F0, FW0 =
			V0.Density, V0.Elasticity,
		V0.ElasticityWeight, V0.Friction,
		V0.FrictionWeight

		local DD, DE, DEW, DF, DFW =
			V1.Density - D0, V1.Elasticity - E0,
		V1.ElasticityWeight - EW0, V1.Friction - F0,
		V1.FrictionWeight - FW0

		return function(Alpha)
			return PhysicalProperties.new(
				D0 + Alpha * DD,
				E0 + Alpha * DE, EW0 + Alpha * DEW,
				F0 + Alpha * DF, FW0 + Alpha * DFW
			)
		end
	end;

	Ray = function(V0, V1)
		local O0, D0, O1, D1 = V0.Origin, V0.Direction, V1.Origin, V1.Direction
		local OX0, OY0, OZ0, DX0, DY0, DZ0 = O0.X, O0.Y, O0.Z, D0.X, D0.Y, D0.Z
		local DOX, DOY, DOZ, DDX, DDY, DDZ = O1.X - OX0, O1.Y - OY0, O1.Z - OZ0, D1.X - DX0, D1.Y - DY0, D1.Z - DZ0

		return function(Alpha)
			return Ray.new(
				Vector3.new(OX0 + Alpha * DOX, OY0 + Alpha * DOY, OZ0 + Alpha * DOZ),
				Vector3.new(DX0 + Alpha * DDX, DY0 + Alpha * DDY, DZ0 + Alpha * DDZ)
			)
		end
	end;

	UDim = function(V0, V1)
		local SC, OF = V0.Scale, V0.Offset
		local DSC, DOF = V1.Scale - SC, V1.Offset - OF

		return function(Alpha)
			return UDim.new(SC + Alpha * DSC, OF + Alpha * DOF)
		end
	end;

	UDim2 = RobloxLerp;
	Vector2 = RobloxLerp;
	Vector3 = RobloxLerp;
	Rect = function(V0, V1)
		return function(Alpha)
			return Rect.new(
				V0.Min.X + Alpha * (V1.Min.X - V0.Min.X), V0.Min.Y + Alpha * (V1.Min.Y - V0.Min.Y),
				V0.Max.X + Alpha * (V1.Max.X - V0.Max.X), V0.Max.Y + Alpha * (V1.Max.Y - V0.Max.Y)
			)
		end
	end;

	Region3 = function(V0, V1)
		return function(Alpha)
			local imin = Lerp(V0.CFrame * (-V0.Size / 2), V1.CFrame * (-V1.Size / 2), Alpha)
			local imax = Lerp(V0.CFrame * (V0.Size / 2), V1.CFrame * (V1.Size / 2), Alpha)

			local iminx = imin.X
			local imaxx = imax.X
			local iminy = imin.Y
			local imaxy = imax.Y
			local iminz = imin.Z
			local imaxz = imax.Z

			return Region3.new(
				Vector3.new(iminx < imaxx and iminx or imaxx, iminy < imaxy and iminy or imaxy, iminz < imaxz and iminz or imaxz),
				Vector3.new(iminx > imaxx and iminx or imaxx, iminy > imaxy and iminy or imaxy, iminz > imaxz and iminz or imaxz)
			)
		end
	end;

	NumberSequence = function(V0, V1)
		return function(Alpha)
			local keypoints = {}
			local addedTimes = {}
			local keylength = 0

			for _, ap in ipairs(V0.Keypoints) do
				local closestAbove, closestBelow

				for _, bp in ipairs(V1.Keypoints) do
					if bp.Time == ap.Time then
						closestAbove, closestBelow = bp, bp
						break
					elseif bp.Time < ap.Time and (closestBelow == nil or bp.Time > closestBelow.Time) then
						closestBelow = bp
					elseif bp.Time > ap.Time and (closestAbove == nil or bp.Time < closestAbove.Time) then
						closestAbove = bp
					end
				end

				local bValue, bEnvelope
				if closestAbove == closestBelow then
					bValue, bEnvelope = closestAbove.Value, closestAbove.Envelope
				else
					local p = (ap.Time - closestBelow.Time) / (closestAbove.Time - closestBelow.Time)
					bValue = (closestAbove.Value - closestBelow.Value) * p + closestBelow.Value
					bEnvelope = (closestAbove.Envelope - closestBelow.Envelope) * p + closestBelow.Envelope
				end

				keylength += 1
				keypoints[keylength] = NumberSequenceKeypoint.new(ap.Time, (bValue - ap.Value) * Alpha + ap.Value, (bEnvelope - ap.Envelope) * Alpha + ap.Envelope)
				addedTimes[ap.Time] = true
			end

			for _, bp in ipairs(V1.Keypoints) do
				if not addedTimes[bp.Time] then
					local closestAbove, closestBelow

					for _, ap in ipairs(V0.Keypoints) do
						if ap.Time == bp.Time then
							closestAbove, closestBelow = ap, ap
							break
						elseif ap.Time < bp.Time and (closestBelow == nil or ap.Time > closestBelow.Time) then
							closestBelow = ap
						elseif ap.Time > bp.Time and (closestAbove == nil or ap.Time < closestAbove.Time) then
							closestAbove = ap
						end
					end

					local aValue, aEnvelope
					if closestAbove == closestBelow then
						aValue, aEnvelope = closestAbove.Value, closestAbove.Envelope
					else
						local p = (bp.Time - closestBelow.Time) / (closestAbove.Time - closestBelow.Time)
						aValue = (closestAbove.Value - closestBelow.Value) * p + closestBelow.Value
						aEnvelope = (closestAbove.Envelope - closestBelow.Envelope) * p + closestBelow.Envelope
					end

					keylength += 1
					keypoints[keylength] = NumberSequenceKeypoint.new(bp.Time, (bp.Value - aValue) * Alpha + aValue, (bp.Envelope - aEnvelope) * Alpha + aEnvelope)
				end
			end

			table.sort(keypoints, SortByTime)
			return NumberSequence.new(keypoints)
		end
	end;

	ColorSequence = function(V0, V1)
		return function(Alpha)
			local keypoints = {}
			local addedTimes = {}
			local keylength = 0

			for _, ap in ipairs(V0.Keypoints) do
				local closestAbove, closestBelow

				for _, bp in ipairs(V1.Keypoints) do
					if bp.Time == ap.Time then
						closestAbove, closestBelow = bp, bp
						break
					elseif bp.Time < ap.Time and (closestBelow == nil or bp.Time > closestBelow.Time) then
						closestBelow = bp
					elseif bp.Time > ap.Time and (closestAbove == nil or bp.Time < closestAbove.Time) then
						closestAbove = bp
					end
				end

				local bValue
				if closestAbove == closestBelow then
					bValue = closestAbove.Value
				else
					bValue = Color3Lerp(closestBelow.Value, closestAbove.Value)((ap.Time - closestBelow.Time) / (closestAbove.Time - closestBelow.Time))
				end

				keylength += 1
				keypoints[keylength] = ColorSequenceKeypoint.new(ap.Time, Color3Lerp(ap.Value, bValue)(Alpha))
				addedTimes[ap.Time] = true
			end

			for _, bp in ipairs(V1.Keypoints) do
				if not addedTimes[bp.Time] then
					local closestAbove, closestBelow

					for _, ap in ipairs(V0.Keypoints) do
						if ap.Time == bp.Time then
							closestAbove, closestBelow = ap, ap
							break
						elseif ap.Time < bp.Time and (closestBelow == nil or ap.Time > closestBelow.Time) then
							closestBelow = ap
						elseif ap.Time > bp.Time and (closestAbove == nil or ap.Time < closestAbove.Time) then
							closestAbove = ap
						end
					end

					local aValue
					if closestAbove == closestBelow then
						aValue = closestAbove.Value
					else
						aValue = Color3Lerp(closestBelow.Value, closestAbove.Value)((bp.Time - closestBelow.Time) / (closestAbove.Time - closestBelow.Time))
					end

					keylength += 1
					keypoints[keylength] = ColorSequenceKeypoint.new(bp.Time, Color3Lerp(bp.Value, aValue)(Alpha))
				end
			end

			table.sort(keypoints, SortByTime)
			return ColorSequence.new(keypoints)
		end
	end;
}, {
	__index = function(_, Index)
		error("No lerp function is defined for type " .. tostring(Index) .. ".", 4)
	end;

	__newindex = function(_, Index)
		error("No lerp function is defined for type " .. tostring(Index) .. ".", 4)
	end;
})

return Lerps
