------------------------------|åˆ†å‰²çº¿|------------------------------


function BezierCurve.LinearBezierCurves(Frame , FPS , Target , Position1 , Position2)

	if typeof(Position1) ~= "Vector3" then
		Position1 = Position1.Position
	end

	if typeof(Position2) ~= "Vector3" then
		Position2 = Position2.Position
	end

	for Index = 0 , Frame , 1 do

		local Time = Index / Frame

		Target.Position = BezierCurve.Lerp(Position1 , Position2 , Time)

		task.wait(1 / FPS)
	end

end

function BezierCurve.QuadraticBezierCurves(Frame , FPS , Target , Position1 , Position2 , Position3)

	if typeof(Position1) ~= "Vector3" then
		Position1 = Position1.Position
	end

	if typeof(Position2) ~= "Vector3" then
		Position2 = Position2.Position
	end

	if typeof(Position3) ~= "Vector3" then
		Position3 = Position3.Position
	end

	for Index = 0 , Frame , 1 do

		local Time = Index / Frame

		local Lerp1 = BezierCurve.Lerp(Position1 , Position2 , Time)
		local Lerp2 = BezierCurve.Lerp(Position2 , Position3 , Time)

		Target.Position = BezierCurve.Lerp(Lerp1 , Lerp2 , Time)

		task.wait(1 / FPS)

	end

end

function BezierCurve.CubicBezierCurves(Frame , FPS , Target , Position1:Vector3 , Position2 , Position3 , Position4)

	if typeof(Position1) ~= "Vector3" then
		Position1 = Position1.Position
	end

	if typeof(Position2) ~= "Vector3" then
		Position2 = Position2.Position
	end

	if typeof(Position3) ~= "Vector3" then
		Position3 = Position3.Position
	end

	if typeof(Position4) ~= "Vector3" then
		Position4 = Position4.Position
	end

	for Index = 0 , Frame , 1 do

		local Time = Index / Frame

		local Lerp1 = BezierCurve.Lerp(Position1 , Position2 , Time)
		local Lerp2 = BezierCurve.Lerp(Position2 , Position3 , Time)
		local Lerp3 = BezierCurve.Lerp(Position3 , Position4 , Time)

		local InLerp1 = BezierCurve.Lerp(Lerp1 , Lerp2 , Time)
		local InLerp2 = BezierCurve.Lerp(Lerp2 , Lerp3 , Time)

		Target.Position = BezierCurve.Lerp(InLerp1 , InLerp2 , Time)

		task.wait(1 / FPS)

	end

end
