local function k(k,u,B,R)k=k/R return(B*k)*k+u end local function u(k,u,B,R)k=k/R return(-B*k)*(k-2)+u end local function B(k,u,B,R)k=(k/R)*2 return k<1 and((B*.5)*k)*k+u or(-B*.5)*((k-1)*(k-3)-1)+u end local function R(k,u,B,R)if k<R*.5 then k=(2*k)/R return((-0.5*B)*k)*(k-2)+u else k,B=(k*2-R)/R,.5*B return((B*k)*k+u)+B end end local function H(k,u,B,R)k=k/R return((B*k)*k)*k+u end local function O(k,u,B,R)k=k/R-1 return B*((k*k)*k+1)+u end local function z(k,u,B,R)k=(k/R)*2 if k<1 then return(((B*.5)*k)*k)*k+u else k=k-2 return(B*.5)*((k*k)*k+2)+u end end local function t(k,u,B,R)if k<R*.5 then k=(k*2)/R-1 return(B*.5)*((k*k)*k+1)+u else k,B=(k*2-R)/R,B*.5 return(((B*k)*k)*k+u)+B end end local function X(k,u,B,R)k=k/R return(((B*k)*k)*k)*k+u end local function j(k,u,B,R)k=k/R-1 return-B*(((k*k)*k)*k-1)+u end local function v(k,u,B,R)k=(k/R)*2 if k<1 then return((((B*.5)*k)*k)*k)*k+u else k=k-2 return(-B*.5)*(((k*k)*k)*k-2)+u end end local function S(k,u,B,R)if k<R*.5 then k,B=(k*2)/R-1,B*.5 return-B*(((k*k)*k)*k-1)+u else k,B=(k*2-R)/R,B*.5 return((((B*k)*k)*k)*k+u)+B end end local function C(k,u,B,R)k=k/R return((((B*k)*k)*k)*k)*k+u end local function G(k,u,B,R)k=k/R-1 return B*((((k*k)*k)*k)*k+1)+u end local function E(k,u,B,R)k=(k/R)*2 if k<1 then return(((((B*.5)*k)*k)*k)*k)*k+u else k=k-2 return(B*.5)*((((k*k)*k)*k)*k+2)+u end end local function Q(k,u,B,R)if k<R*.5 then k=(k*2)/R-1 return(B*.5)*((((k*k)*k)*k)*k+1)+u else k,B=(k*2-R)/R,B*.5 return(((((B*k)*k)*k)*k)*k+u)+B end end local function l(k,u,B,R)return(-B*cos((k/R)*1.5707963267949)+B)+u end local function e(k,u,B,R)return B*sin((k/R)*1.5707963267949)+u end local function h(k,u,B,R)return(-B*.5)*(cos((3.1415926535898*k)/R)-1)+u end local function P(k,u,B,R)B=B*.5 return k<R*.5 and B*sin(((k*2)/R)*1.5707963267949)+u or(-B*cos(((k*2-R)/R)*1.5707963267949)+2*B)+u end local function w(k,u,B,R)return k==0 and u or(B*2^(10*(k/R-1))+u)-B*.001 end local function Z(k,u,B,R)return k==R and u+B or(B*1.001)*(1-2^((-10*k)/R))+u end local function q(k,u,B,R)k=(k/R)*2 return k==0 and u or k==2 and u+B or k<1 and((B*.5)*2^(10*(k-1))+u)-B*.0005 or((B*.5)*1.0005)*(2-2^(-10*(k-1)))+u end local function T(k,u,B,R)B=B*.5 return k<R*.5 and(k*2==R and u+B or(B*1.001)*(1-2^((-20*k)/R))+u)or k*2-R==0 and u+B or((B*2^(10*((k*2-R)/R-1))+u)+B)-B*.001 end local function c(k,u,B,R)k=k/R return-B*((1-k*k)^.5-1)+u end local function n(k,u,B,R)k=k/R-1 return B*(1-k*k)^.5+u end local function A(k,u,B,R)k=(k/R)*2 if k<1 then return(-B*.5)*((1-k*k)^.5-1)+u else k=k-2 return(B*.5)*((1-k*k)^.5+1)+u end end local function U(k,u,B,R)B=B*.5 if k<R*.5 then k=(k*2)/R-1 return B*(1-k*k)^.5+u else k=(k*2-R)/R return(-B*((1-k*k)^.5-1)+u)+B end end local function I(k,u,B,R,H,O)k=k/R-1 O=O or R*.3 return k==-1 and u or k==0 and u+B or(not H or H<(B>=0 and B or 0-B))and-((B*2^(10*k))*sin(((k*R-O*.25)*6.2831853071796)/O))+u or-((H*2^(10*k))*sin(((k*R-(O/6.2831853071796)*asin(B/H))*6.2831853071796)/O))+u end local function J(k,u,B,R,H,O)k=k/R O=O or R*.3 return k==0 and u or k==1 and u+B or(not H or H<(B>=0 and B or 0-B))and((B*2^(-10*k))*sin(((k*R-O*.25)*6.2831853071796)/O)+B)+u or((H*2^(-10*k))*sin(((k*R-(O/6.2831853071796)*asin(B/H))*6.2831853071796)/O)+B)+u end local function Y(k,u,B,R,H,O)if k==0 then return u end k=(k/R)*2-1 if k==1 then return u+B end O=O or R*.45 H=H or 0 local z if not H or H<(B>=0 and B or 0-B)then H=B z=O*.25 else z=(O/6.2831853071796)*asin(B/H)end if k<1 then return((-0.5*H)*2^(10*k))*sin(((k*R-z)*6.2831853071796)/O)+u else return(((H*2^(-10*k))*sin(((k*R-z)*6.2831853071796)/O))*.5+B)+u end end local function i(k,u,B,R,H,O)if k<R*.5 then return J(k*2,u,B*.5,R,H,O)else return I(k*2-R,u+B*.5,B*.5,R,H,O)end end local function a(k,u,B,R,H)H=H or 1.70158 k=k/R return((B*k)*k)*((H+1)*k-H)+u end local function V(k,u,B,R,H)H=H or 1.70158 k=k/R-1 return B*((k*k)*((H+1)*k+H)+1)+u end local function W(k,u,B,R,H)H=(H or 1.70158)*1.525 k=(k/R)*2 if k<1 then return(B*.5)*((k*k)*((H+1)*k-H))+u else k=k-2 return(B*.5)*((k*k)*((H+1)*k+H)+2)+u end end local function g(k,u,B,R,H)B=B*.5 H=H or 1.70158 if k<R*.5 then k=(k*2)/R-1 return B*((k*k)*((H+1)*k+H)+1)+u else k=(k*2-R)/R return(((B*k)*k)*((H+1)*k-H)+u)+B end end local function s(k,u,B,R)k=k/R if k<.36363636363636 then return B*((7.5625*k)*k)+u elseif k<.72727272727273 then k=k-.54545454545455 return B*((7.5625*k)*k+.75)+u elseif k<.90909090909091 then k=k-.81818181818182 return B*((7.5625*k)*k+.9375)+u else k=k-.95454545454545 return B*((7.5625*k)*k+.984375)+u end end local function f(k,u,B,R)return(B-s(R-k,0,B,R))+u end local function d(k,u,B,R)if k<R*.5 then return f(k*2,0,B,R)*.5+u else return(s(k*2-R,0,B,R)*.5+B*.5)+u end end local function N(k,u,B,R)if k<R*.5 then return s(k*2,u,B*.5,R)else return f(k*2-R,u+B*.5,B*.5,R)end end return{[Enum.EasingDirection.In.Name]={[Enum.EasingStyle.Linear.Name]=Linear,[Enum.EasingStyle.Sine.Name]=l;[Enum.EasingStyle.Back.Name]=a;[Enum.EasingStyle.Quad.Name]=k,[Enum.EasingStyle.Quart.Name]=X,[Enum.EasingStyle.Quint.Name]=C;[Enum.EasingStyle.Bounce.Name]=f;[Enum.EasingStyle.Elastic.Name]=I,Smooth=Smooth,Smoother=Smoother;RevBack=RevBack,RidiculousWiggle=RidiculousWiggle;Spring=Spring;SoftSpring=SoftSpring,Expo=w,Cubic=H,Circ=c},[Enum.EasingDirection.Out.Name]={[Enum.EasingStyle.Linear.Name]=Linear;[Enum.EasingStyle.Sine.Name]=e;[Enum.EasingStyle.Back.Name]=V,[Enum.EasingStyle.Quad.Name]=u,[Enum.EasingStyle.Quart.Name]=j;[Enum.EasingStyle.Quint.Name]=G,[Enum.EasingStyle.Bounce.Name]=s,[Enum.EasingStyle.Elastic.Name]=J;Smooth=Smooth;Smoother=Smoother,RevBack=RevBack;RidiculousWiggle=RidiculousWiggle;Spring=Spring,SoftSpring=SoftSpring,Expo=Z;Cubic=O;Circ=n},[Enum.EasingDirection.InOut.Name]={[Enum.EasingStyle.Linear.Name]=Linear;[Enum.EasingStyle.Sine.Name]=h,[Enum.EasingStyle.Back.Name]=W,[Enum.EasingStyle.Quad.Name]=B;[Enum.EasingStyle.Quart.Name]=v;[Enum.EasingStyle.Quint.Name]=E;[Enum.EasingStyle.Bounce.Name]=d;[Enum.EasingStyle.Elastic.Name]=Y,Smooth=Smooth;Smoother=Smoother,RevBack=RevBack;RidiculousWiggle=RidiculousWiggle;Spring=Spring,SoftSpring=SoftSpring;Expo=q;Cubic=z;Circ=A};OutIn={[Enum.EasingStyle.Linear.Name]=Linear;[Enum.EasingStyle.Sine.Name]=P;[Enum.EasingStyle.Back.Name]=g,[Enum.EasingStyle.Quad.Name]=R;[Enum.EasingStyle.Quart.Name]=S,[Enum.EasingStyle.Quint.Name]=Q,[Enum.EasingStyle.Bounce.Name]=N;[Enum.EasingStyle.Elastic.Name]=i,Smooth=Smooth,Smoother=Smoother,RevBack=RevBack,RidiculousWiggle=RidiculousWiggle;Spring=Spring;SoftSpring=SoftSpring;Expo=T;Cubic=t;Circ=U}}


local function InQuad(t, b, c, d)
	t = t / d
	return c * t * t + b
end

local function OutQuad(t, b, c, d)
	t = t / d
	return -c * t * (t - 2) + b
end

local function InOutQuad(t, b, c, d)
	t = t / d * 2
	return t < 1 and c * 0.5 * t * t + b or -c * 0.5 * ((t - 1) * (t - 3) - 1) + b
end

local function OutInQuad(t, b, c, d)
	if t < d * 0.5 then
		t = 2 * t / d
		return -0.5 * c * t * (t - 2) + b
	else
		t, c = ((t * 2) - d) / d, 0.5 * c
		return c * t * t + b + c
	end
end

local function InCubic(t, b, c, d)
	t = t / d
	return c * t * t * t + b
end

local function OutCubic(t, b, c, d)
	t = t / d - 1
	return c * (t * t * t + 1) + b
end

local function InOutCubic(t, b, c, d)
	t = t / d * 2
	if t < 1 then
		return c * 0.5 * t * t * t + b
	else
		t = t - 2
		return c * 0.5 * (t * t * t + 2) + b
	end
end

local function OutInCubic(t, b, c, d)
	if t < d * 0.5 then
		t = t * 2 / d - 1
		return c * 0.5 * (t * t * t + 1) + b
	else
		t, c = ((t * 2) - d) / d, c * 0.5
		return c * t * t * t + b + c
	end
end

local function InQuart(t, b, c, d)
	t = t / d
	return c * t * t * t * t + b
end

local function OutQuart(t, b, c, d)
	t = t / d - 1
	return -c * (t * t * t * t - 1) + b
end

local function InOutQuart(t, b, c, d)
	t = t / d * 2
	if t < 1 then
		return c * 0.5 * t * t * t * t + b
	else
		t = t - 2
		return -c * 0.5 * (t * t * t * t - 2) + b
	end
end

local function OutInQuart(t, b, c, d)
	if t < d * 0.5 then
		t, c = t * 2 / d - 1, c * 0.5
		return -c * (t * t * t * t - 1) + b
	else
		t, c = ((t * 2) - d) / d, c * 0.5
		return c * t * t * t * t + b + c
	end
end

local function InQuint(t, b, c, d)
	t = t / d
	return c * t * t * t * t * t + b
end

local function OutQuint(t, b, c, d)
	t = t / d - 1
	return c * (t * t * t * t * t + 1) + b
end

local function InOutQuint(t, b, c, d)
	t = t / d * 2
	if t < 1 then
		return c * 0.5 * t * t * t * t * t + b
	else
		t = t - 2
		return c * 0.5 * (t * t * t * t * t + 2) + b
	end
end

local function OutInQuint(t, b, c, d)
	if t < d * 0.5 then
		t = t * 2 / d - 1
		return c * 0.5 * (t * t * t * t * t + 1) + b
	else
		t, c = ((t * 2) - d) / d, c * 0.5
		return c * t * t * t * t * t + b + c
	end
end

local function InSine(t, b, c, d)
	return -c * cos(t / d * 1.5707963267948965579989817342720925807952880859375) + c + b
end

local function OutSine(t, b, c, d)
	return c * sin(t / d * 1.5707963267948965579989817342720925807952880859375) + b
end

local function InOutSine(t, b, c, d)
	return -c * 0.5 * (cos(3.14159265358979311599796346854418516159057617187 * t / d) - 1) + b
end

local function OutInSine(t, b, c, d)
	c = c * 0.5
	return t < d * 0.5 and c * sin(t * 2 / d * 1.5707963267948965579989817342720925807952880859375) + b or -c * cos(((t * 2) - d) / d * 1.5707963267948965579989817342720925807952880859375) + 2 * c + b
end

local function InExpo(t, b, c, d)
	return t == 0 and b or c * 2 ^ (10 * (t / d - 1)) + b - c * 0.001
end

local function OutExpo(t, b, c, d)
	return t == d and b + c or c * 1.001 * (1 - 2 ^ (-10 * t / d)) + b
end

local function InOutExpo(t, b, c, d)
	t = t / d * 2
	return t == 0 and b or t == 2 and b + c or t < 1 and c * 0.5 * 2 ^ (10 * (t - 1)) + b - c * 0.0005 or c * 0.5 * 1.0005 * (2 - 2 ^ (-10 * (t - 1))) + b
end

local function OutInExpo(t, b, c, d)
	c = c * 0.5
	return t < d * 0.5 and (t * 2 == d and b + c or c * 1.001 * (1 - 2 ^ (-20 * t / d)) + b) or t * 2 - d == 0 and b + c or c * 2 ^ (10 * ((t * 2 - d) / d - 1)) + b + c - c * 0.001
end

local function InCirc(t, b, c, d)
	t = t / d
	return -c * ((1 - t * t) ^ 0.5 - 1) + b
end

local function OutCirc(t, b, c, d)
	t = t / d - 1
	return c * (1 - t * t) ^ 0.5 + b
end

local function InOutCirc(t, b, c, d)
	t = t / d * 2
	if t < 1 then
		return -c * 0.5 * ((1 - t * t) ^ 0.5 - 1) + b
	else
		t = t - 2
		return c * 0.5 * ((1 - t * t) ^ 0.5 + 1) + b
	end
end

local function OutInCirc(t, b, c, d)
	c = c * 0.5
	if t < d * 0.5 then
		t = t * 2 / d - 1
		return c * (1 - t * t) ^ 0.5 + b
	else
		t = (t * 2 - d) / d
		return -c * ((1 - t * t) ^ 0.5 - 1) + b + c
	end
end

local function InElastic(t, b, c, d, a, p)
	t = t / d - 1
	p = p or d * 0.3
	return t == -1 and b or t == 0 and b + c or (not a or a < (c >= 0 and c or 0 - c)) and -(c * 2 ^ (10 * t) * sin((t * d - p * 0.25) * 6.28318530717958623199592693708837032318115234375 / p)) + b or -(a * 2 ^ (10 * t) * sin((t * d - p / 6.28318530717958623199592693708837032318115234375 * asin(c / a)) * 6.28318530717958623199592693708837032318115234375 / p)) + b
end

local function OutElastic(t, b, c, d, a, p)
	t = t / d
	p = p or d * 0.3
	return t == 0 and b or t == 1 and b + c or (not a or a < (c >= 0 and c or 0 - c)) and c * 2 ^ (-10 * t) * sin((t * d - p * 0.25) * 6.28318530717958623199592693708837032318115234375 / p) + c + b or a * 2 ^ (-10 * t) * sin((t * d - p / 6.28318530717958623199592693708837032318115234375 * asin(c / a)) * 6.28318530717958623199592693708837032318115234375 / p) + c + b
end

local function InOutElastic(t, b, c, d, a, p)
	if t == 0 then
		return b
	end

	t = t / d * 2 - 1

	if t == 1 then
		return b + c
	end

	p = p or d * 0.45
	a = a or 0

	local s

	if not a or a < (c >= 0 and c or 0 - c) then
		a = c
		s = p * 0.25
	else
		s = p / 6.28318530717958623199592693708837032318115234375 * asin(c / a)
	end

	if t < 1 then
		return -0.5 * a * 2 ^ (10 * t) * sin((t * d - s) * 6.28318530717958623199592693708837032318115234375 / p) + b
	else
		return a * 2 ^ (-10 * t) * sin((t * d - s) * 6.28318530717958623199592693708837032318115234375 / p ) * 0.5 + c + b
	end
end

local function OutInElastic(t, b, c, d, a, p)
	if t < d * 0.5 then
		return OutElastic(t * 2, b, c * 0.5, d, a, p)
	else
		return InElastic(t * 2 - d, b + c * 0.5, c * 0.5, d, a, p)
	end
end

local function InBack(t, b, c, d, s)
	s = s or 1.70158
	t = t / d
	return c * t * t * ((s + 1) * t - s) + b
end

local function OutBack(t, b, c, d, s)
	s = s or 1.70158
	t = t / d - 1
	return c * (t * t * ((s + 1) * t + s) + 1) + b
end

local function InOutBack(t, b, c, d, s)
	s = (s or 1.70158) * 1.525
	t = t / d * 2
	if t < 1 then
		return c * 0.5 * (t * t * ((s + 1) * t - s)) + b
	else
		t = t - 2
		return c * 0.5 * (t * t * ((s + 1) * t + s) + 2) + b
	end
end

local function OutInBack(t, b, c, d, s)
	c = c * 0.5
	s = s or 1.70158
	if t < d * 0.5 then
		t = (t * 2) / d - 1
		return c * (t * t * ((s + 1) * t + s) + 1) + b
	else
		t = ((t * 2) - d) / d
		return c * t * t * ((s + 1) * t - s) + b + c
	end
end

local function OutBounce(t, b, c, d)
	t = t / d
	if t < 1 / 2.75 then
		return c * (7.5625 * t * t) + b
	elseif t < 2 / 2.75 then
		t = t - (1.5 / 2.75)
		return c * (7.5625 * t * t + 0.75) + b
	elseif t < 2.5 / 2.75 then
		t = t - (2.25 / 2.75)
		return c * (7.5625 * t * t + 0.9375) + b
	else
		t = t - (2.625 / 2.75)
		return c * (7.5625 * t * t + 0.984375) + b
	end
end

local function InBounce(t, b, c, d)
	return c - OutBounce(d - t, 0, c, d) + b
end

local function InOutBounce(t, b, c, d)
	if t < d * 0.5 then
		return InBounce(t * 2, 0, c, d) * 0.5 + b
	else
		return OutBounce(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b
	end
end

local function OutInBounce(t, b, c, d)
	if t < d * 0.5 then
		return OutBounce(t * 2, b, c * 0.5, d)
	else
		return InBounce(t * 2 - d, b + c * 0.5, c * 0.5, d)
	end
end

return {
	[Enum.EasingDirection.In.Name] = {
		[Enum.EasingStyle.Linear.Name] = Linear;
		[Enum.EasingStyle.Sine.Name] = InSine;
		[Enum.EasingStyle.Back.Name] = InBack;
		[Enum.EasingStyle.Quad.Name] = InQuad;
		[Enum.EasingStyle.Quart.Name] = InQuart;
		[Enum.EasingStyle.Quint.Name] = InQuint;
		[Enum.EasingStyle.Bounce.Name] = InBounce;
		[Enum.EasingStyle.Elastic.Name] = InElastic;
		Smooth = Smooth;
		Smoother = Smoother;
		RevBack = RevBack;
		RidiculousWiggle = RidiculousWiggle;
		Spring = Spring;
		SoftSpring = SoftSpring;
		Expo = InExpo;
		Cubic = InCubic;
		Circ = InCirc;
	};

	[Enum.EasingDirection.Out.Name] = {
		[Enum.EasingStyle.Linear.Name] = Linear;
		[Enum.EasingStyle.Sine.Name] = OutSine;
		[Enum.EasingStyle.Back.Name] = OutBack;
		[Enum.EasingStyle.Quad.Name] = OutQuad;
		[Enum.EasingStyle.Quart.Name] = OutQuart;
		[Enum.EasingStyle.Quint.Name] = OutQuint;
		[Enum.EasingStyle.Bounce.Name] = OutBounce;
		[Enum.EasingStyle.Elastic.Name] = OutElastic;
		Smooth = Smooth;
		Smoother = Smoother;
		RevBack = RevBack;
		RidiculousWiggle = RidiculousWiggle;
		Spring = Spring;
		SoftSpring = SoftSpring;
		Expo = OutExpo;
		Cubic = OutCubic;
		Circ = OutCirc;
	};

	[Enum.EasingDirection.InOut.Name] = {
		[Enum.EasingStyle.Linear.Name] = Linear;
		[Enum.EasingStyle.Sine.Name] = InOutSine;
		[Enum.EasingStyle.Back.Name] = InOutBack;
		[Enum.EasingStyle.Quad.Name] = InOutQuad;
		[Enum.EasingStyle.Quart.Name] = InOutQuart;
		[Enum.EasingStyle.Quint.Name] = InOutQuint;
		[Enum.EasingStyle.Bounce.Name] = InOutBounce;
		[Enum.EasingStyle.Elastic.Name] = InOutElastic;
		Smooth = Smooth;
		Smoother = Smoother;
		RevBack = RevBack;
		RidiculousWiggle = RidiculousWiggle;
		Spring = Spring;
		SoftSpring = SoftSpring;
		Expo = InOutExpo;
		Cubic = InOutCubic;
		Circ = InOutCirc;
	};

	OutIn = {
		[Enum.EasingStyle.Linear.Name] = Linear;
		[Enum.EasingStyle.Sine.Name] = OutInSine;
		[Enum.EasingStyle.Back.Name] = OutInBack;
		[Enum.EasingStyle.Quad.Name] = OutInQuad;
		[Enum.EasingStyle.Quart.Name] = OutInQuart;
		[Enum.EasingStyle.Quint.Name] = OutInQuint;
		[Enum.EasingStyle.Bounce.Name] = OutInBounce;
		[Enum.EasingStyle.Elastic.Name] = OutInElastic;
		Smooth = Smooth;
		Smoother = Smoother;
		RevBack = RevBack;
		RidiculousWiggle = RidiculousWiggle;
		Spring = Spring;
		SoftSpring = SoftSpring;
		Expo = OutInExpo;
		Cubic = OutInCubic;
		Circ = OutInCirc;
	};
}
