-- Generic Roblox DataType lerp function.

local function RobloxLerp(V0, V1)
	return function(DeltaTime)
		return V0:Lerp(V1, DeltaTime)
	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 Lerps = setmetatable({
	boolean = function(V0, V1)
		return function(DeltaTime)
			if DeltaTime < 0.5 then
				return V0
			else
				return V1
			end
		end
	end;

	number = function(V0, V1)
		local Delta = V1 - V0
		return function(DeltaTime)
			return V0 + Delta * DeltaTime
		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(DeltaTime)
				local Alpha = 1 + Length * DeltaTime
				return string.sub(V1, 1, Alpha < Length and Alpha or Length)
			end
		else
			return function(DeltaTime)
				local FS = (N0 + D * DeltaTime) % 86400
				local S = FS >= 0 and FS or 0 - 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 = function(C0, C1)