local e=script.Parent.Parent local Q=e:WaitForChild("\072\117\109\097\110\111\105\100")local o,H=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\078\111\085\112\100\097\116\101\079\110\076\111\111\112")end)local Z,M=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\069\109\111\116\101\084\111\082\117\110\084\104\114\101\115\104\111\108\100\067\104\097\110\103\101")end)local D,t=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\080\108\097\121\069\109\111\116\101\066\121\073\100\065\110\105\109\084\114\097\099\107\082\101\116\117\114\110\050")end)if not D then end local V=script:FindFirstChild("\083\099\097\108\101\068\097\109\112\101\110\105\110\103\080\101\114\099\101\110\116")math.randomseed(tick())function findExistingAnimationInSet(e,Q)if e~=nil then if Q==nil then return 0 end else return 0 end local o=e.count local H=0 while true do if e[H].anim.AnimationId==Q.AnimationId then return H end if true then if H<o then else break end elseif o<H then else break end H=H+1 end return 0 end local k={}local K={}function configureAnimationSet(e,o)if k[e]~=nil then local Q,o,H=pairs(k[e].connections)while true do local e,Z=Q(o,H)if e then else break end H=e Z:disconnect()end end k[e]={}k[e].count=0 k[e].totalWeight=0 k[e].connections={}local H=true local Z,M=pcall(function()H=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not Z then H=true end local D=script:FindFirstChild(e)if H then if D~=nil then table.insert(k[e].connections,D.ChildAdded:connect(function(Q)configureAnimationSet(e,o)end))table.insert(k[e].connections,D.ChildRemoved:connect(function(Q)configureAnimationSet(e,o)end))local Q,H,Z=pairs(D:GetChildren())while true do local M,D=Q(H,Z)if M then else break end Z=M if D:IsA("\065\110\105\109\097\116\105\111\110")then local Q=1 local H=D:FindFirstChild("\087\101\105\103\104\116")if H~=nil then Q=H.Value end k[e].count=k[e].count+1 local Z=k[e].count k[e][Z]={}k[e][Z].anim=D k[e][Z].weight=Q k[e].totalWeight=k[e].totalWeight+k[e][Z].weight table.insert(k[e].connections,D.Changed:connect(function(Q)configureAnimationSet(e,o)end))table.insert(k[e].connections,D.ChildAdded:connect(function(Q)configureAnimationSet(e,o)end))table.insert(k[e].connections,D.ChildRemoved:connect(function(Q)configureAnimationSet(e,o)end))end end end end if k[e].count<=0 then local Q,H,Z=pairs(o)while true do local o,M=Q(H,Z)if o then else break end Z=o k[e][o]={}k[e][o].anim=Instance.new("\065\110\105\109\097\116\105\111\110")k[e][o].anim.Name=e k[e][o].anim.AnimationId=M.id k[e][o].weight=M.weight k[e].count=k[e].count+1 k[e].totalWeight=k[e].totalWeight+M.weight end end local t,V,b=pairs(k)while true do local e,o=t(V,b)if e then else break end local H=o.count local Z=0 while true do if K[o[Z].anim.AnimationId]==nil then Q:LoadAnimation(o[Z].anim)K[o[Z].anim.AnimationId]=true end if true then if Z<H then else break end elseif H<Z then else break end Z=Z+1 end end end function configureAnimationSetOld(e,o)if k[e]~=nil then local Q,o,H=pairs(k[e].connections)while true do local e,Z=Q(o,H)if e then else break end H=e Z:disconnect()end end k[e]={}k[e].count=0 k[e].totalWeight=0 k[e].connections={}local H=true local Z,M=pcall(function()H=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not Z then H=true end local D=script:FindFirstChild(e)if H then if D~=nil then table.insert(k[e].connections,D.ChildAdded:connect(function(Q)configureAnimationSet(e,o)end))table.insert(k[e].connections,D.ChildRemoved:connect(function(Q)configureAnimationSet(e,o)end))local Q=1 local H,Z,M=pairs(D:GetChildren())while true do local D,t=H(Z,M)if D then else break end M=D if t:IsA("\065\110\105\109\097\116\105\111\110")then table.insert(k[e].connections,t.Changed:connect(function(Q)configureAnimationSet(e,o)end))k[e][Q]={}k[e][Q].anim=t local H=t:FindFirstChild("\087\101\105\103\104\116")if H==nil then k[e][Q].weight=1 else k[e][Q].weight=H.Value end k[e].count=k[e].count+1 k[e].totalWeight=k[e].totalWeight+k[e][Q].weight Q=Q+1 end end end end if k[e].count<=0 then local Q,H,Z=pairs(o)while true do local o,M=Q(H,Z)if o then else break end Z=o k[e][o]={}k[e][o].anim=Instance.new("\065\110\105\109\097\116\105\111\110")k[e][o].anim.Name=e k[e][o].anim.AnimationId=M.id k[e][o].weight=M.weight k[e].count=k[e].count+1 k[e].totalWeight=k[e].totalWeight+M.weight end end local t,V,K=pairs(k)while true do local e,o=t(V,K)if e then else break end local H=o.count local Z=0 while true do Q:LoadAnimation(o[Z].anim)if true then if Z<H then else break end elseif H<Z then else break end Z=Z+1 end end end local b={idle={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\054\054\054\054",weight=1},{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\054\057\053\049",weight=1};{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\054\051\056\056";weight=9}},walk={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\055\055\056\050\054";weight=10}};run={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\055\055\049\052";weight=10}};swim={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\056\052\056\057\055";weight=10}},swimidle={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\056\053\048\055\050",weight=10}},jump={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\053\048\048\048",weight=10}},fall={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\055\057\054\056";weight=10}};climb={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\053\048\055\055\054\053\054\052\052";weight=10}},sit={{id="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\050\053\048\054\050\056\049\055\048\051";weight=10}}}function scriptChildModified(e)local Q=b[e.Name]if Q~=nil then configureAnimationSet(e.Name,Q)end end script.ChildAdded:connect(scriptChildModified)script.ChildRemoved:connect(scriptChildModified)for e,Q in pairs(b)do configureAnimationSet(e,Q)end local f=""local O=false local u=nil local B=nil local W=nil local l=nil local j=nil function stopAllAnimations()local e=f if O then e="\105\100\108\101"O=false end f=""u=nil if B~=nil then B:disconnect()end if W~=nil then W:Stop()W:Destroy()W=nil end if l~=nil then l:disconnect()end if j~=nil then j:Stop()j:Destroy()j=nil end return e end local G=V function getHeightScale()if Q then else return 1 end if not Q.AutomaticScalingEnabled then return 1 end local e=Q.HipHeight/2 if G==nil then G=script:FindFirstChild("\083\099\097\108\101\068\097\109\112\101\110\105\110\103\080\101\114\099\101\110\116")end if G~=nil then e=1+((Q.HipHeight-2)*G.Value)/2 end return e end local function z(e)return(e*1.25)/getHeightScale()end local function m(e)local Q=z(e)local o=.0001 local H=.0001 local Z=Q/.5 local M=Q/1 if Q<=.5 then o=1 elseif Q<1 then local e=(Q-.5)/.5 o=1-e H=e Z=1 M=1 else H=1 end W:AdjustWeight(o)j:AdjustWeight(H)W:AdjustSpeed(Z)j:AdjustSpeed(M)end local i=1 function setAnimationSpeed(e)if f=="\119\097\108\107"then m(e)return end if e~=i then i=e W:AdjustSpeed(i)end end local q=o or H function keyFrameReachedFunc(e)if e=="\069\110\100"then if f=="\119\097\108\107"then if q==true then else j.TimePosition=0 W.TimePosition=0 return end if j.Looped~=true then j.TimePosition=0 end if W.Looped~=true then W.TimePosition=0 return end else local e=f if O then if W.Looped then return end e="\105\100\108\101"O=false end playAnimation(e,.15,Q)setAnimationSpeed(i)end end end function rollAnimation(e)local Q=math.random(1,k[e].totalWeight)local o=1 while true do if k[e][o].weight<Q then else break end Q=Q-k[e][o].weight o=o+1 end return o end local function T(e,Q,o,H)if e~=u then if W~=nil then W:Stop(o)W:Destroy()end if j~=nil then j:Stop(o)j:Destroy()if q==true then j=nil end end i=1 W=H:LoadAnimation(e)W.Priority=Enum.AnimationPriority.Core W:Play(o)f=Q u=e if B~=nil then B:disconnect()end B=W.KeyframeReached:connect(keyFrameReachedFunc)if Q=="\119\097\108\107"then j=H:LoadAnimation(k.run[rollAnimation("\114\117\110")].anim)j.Priority=Enum.AnimationPriority.Core j:Play(o)if l~=nil then l:disconnect()end l=j.KeyframeReached:connect(keyFrameReachedFunc)end end end function playAnimation(e,Q,o)T(k[e][rollAnimation(e)].anim,e,Q,o)O=false end function playEmote(e,Q,o)T(e,e.Name,Q,o)O=true end local L=Z or M local N="\083\116\097\110\100\105\110\103"function onRunning(e)local o=L if o then o=O and Q.MoveDirection==Vector3.new(0,0,0)end if(o and Q.WalkSpeed or.75)<e then playAnimation("\119\097\108\107",.2,Q)setAnimationSpeed(e/16)N="\082\117\110\110\105\110\103"return end if not O then playAnimation("\105\100\108\101",.2,Q)N="\083\116\097\110\100\105\110\103"end end function onDied()N="\068\101\097\100"end local R=0 function onJumping()playAnimation("\106\117\109\112",.1,Q)R=.31 N="\074\117\109\112\105\110\103"end function onClimbing(e)playAnimation("\099\108\105\109\098",.1,Q)setAnimationSpeed(e/5)N="\067\108\105\109\098\105\110\103"end function onGettingUp()N="\071\101\116\116\105\110\103\085\112"end function onFreeFall()if R<=0 then playAnimation("\102\097\108\108",.2,Q)end N="\070\114\101\101\070\097\108\108"end function onFallingDown()N="\070\097\108\108\105\110\103\068\111\119\110"end function onSeated()N="\083\101\097\116\101\100"end function onPlatformStanding()N="\080\108\097\116\102\111\114\109\083\116\097\110\100\105\110\103"end function onSwimming(e)if 1<e then else playAnimation("\115\119\105\109\105\100\108\101",.4,Q)N="\083\116\097\110\100\105\110\103"return end playAnimation("\115\119\105\109",.4,Q)setAnimationSpeed(e/10)N="\083\119\105\109\109\105\110\103"end local Y=0 function stepAnimate(e)Y=e if 0<R then R=R-(e-Y)end if N=="\070\114\101\101\070\097\108\108"then if R<=0 then playAnimation("\102\097\108\108",.2,Q)return end end if N=="\083\101\097\116\101\100"then playAnimation("\115\105\116",.5,Q)return end if N=="\082\117\110\110\105\110\103"then playAnimation("\119\097\108\107",.2,Q)return end if N~="\068\101\097\100"then if N~="\071\101\116\116\105\110\103\085\112"then if N~="\070\097\108\108\105\110\103\068\111\119\110"then if N~="\083\101\097\116\101\100"then if N=="\080\108\097\116\102\111\114\109\083\116\097\110\100\105\110\103"then stopAllAnimations()end else stopAllAnimations()end else stopAllAnimations()end else stopAllAnimations()end else stopAllAnimations()end end Q.Died:connect(onDied)Q.Running:connect(onRunning)Q.Jumping:connect(onJumping)Q.Climbing:connect(onClimbing)Q.GettingUp:connect(onGettingUp)Q.FreeFalling:connect(onFreeFall)Q.FallingDown:connect(onFallingDown)Q.Seated:connect(onSeated)Q.PlatformStanding:connect(onPlatformStanding)Q.Swimming:connect(onSwimming)if e.Parent~=nil then playAnimation("\105\100\108\101",.1,Q)N="\083\116\097\110\100\105\110\103"end while e.Parent~=nil do local e,Q=wait(.1)stepAnimate(Q)end


local l__Parent__1 = script.Parent.Parent;
local l__Humanoid__2 = l__Parent__1:WaitForChild("Humanoid");
local v3, v4 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop");
end);
local v5, v6 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserEmoteToRunThresholdChange");
end);
local v7, v8 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserPlayEmoteByIdAnimTrackReturn2");
end);
if not v7 then

end;
local l__ScaleDampeningPercent__9 = script:FindFirstChild("ScaleDampeningPercent");
math.randomseed(tick());
function findExistingAnimationInSet(p1, p2)
	if p1 ~= nil then
		if p2 == nil then
			return 0;
		end;
	else
		return 0;
	end;
	local l__count__10 = p1.count;
	local v11 = 1 - 1;
	while true do
		if p1[v11].anim.AnimationId == p2.AnimationId then
			return v11;
		end;
		if 0 <= 1 then
			if v11 < l__count__10 then

			else
				break;
			end;
		elseif l__count__10 < v11 then

		else
			break;
		end;
		v11 = v11 + 1;	
	end;
	return 0;
end;
local u1 = {};
local u2 = {};
function configureAnimationSet(p3, p4)
	if u1[p3] ~= nil then
		local v12, v13, v14 = pairs(u1[p3].connections);
		while true do
			local v15, v16 = v12(v13, v14);
			if v15 then

			else
				break;
			end;
			v14 = v15;
			v16:disconnect();		
		end;
	end;
	u1[p3] = {};
	u1[p3].count = 0;
	u1[p3].totalWeight = 0;
	u1[p3].connections = {};
	local u3 = true;
	local v17, v18 = pcall(function()
		u3 = game:GetService("StarterPlayer").AllowCustomAnimations;
	end);
	if not v17 then
		u3 = true;
	end;
	local v19 = script:FindFirstChild(p3);
	if u3 then
		if v19 ~= nil then
			table.insert(u1[p3].connections, v19.ChildAdded:connect(function(p5)
				configureAnimationSet(p3, p4);
			end));
			table.insert(u1[p3].connections, v19.ChildRemoved:connect(function(p6)
				configureAnimationSet(p3, p4);
			end));
			local v20, v21, v22 = pairs(v19:GetChildren());
			while true do
				local v23, v24 = v20(v21, v22);
				if v23 then

				else
					break;
				end;
				v22 = v23;
				if v24:IsA("Animation") then
					local v25 = 1;
					local l__Weight__26 = v24:FindFirstChild("Weight");
					if l__Weight__26 ~= nil then
						v25 = l__Weight__26.Value;
					end;
					u1[p3].count = u1[p3].count + 1;
					local l__count__27 = u1[p3].count;
					u1[p3][l__count__27] = {};
					u1[p3][l__count__27].anim = v24;
					u1[p3][l__count__27].weight = v25;
					u1[p3].totalWeight = u1[p3].totalWeight + u1[p3][l__count__27].weight;
					table.insert(u1[p3].connections, v24.Changed:connect(function(p7)
						configureAnimationSet(p3, p4);
					end));
					table.insert(u1[p3].connections, v24.ChildAdded:connect(function(p8)
						configureAnimationSet(p3, p4);
					end));
					table.insert(u1[p3].connections, v24.ChildRemoved:connect(function(p9)
						configureAnimationSet(p3, p4);
					end));
				end;			
			end;
		end;
	end;
	if u1[p3].count <= 0 then
		local v28, v29, v30 = pairs(p4);
		while true do
			local v31, v32 = v28(v29, v30);
			if v31 then

			else
				break;
			end;
			v30 = v31;
			u1[p3][v31] = {};
			u1[p3][v31].anim = Instance.new("Animation");
			u1[p3][v31].anim.Name = p3;
			u1[p3][v31].anim.AnimationId = v32.id;
			u1[p3][v31].weight = v32.weight;
			u1[p3].count = u1[p3].count + 1;
			u1[p3].totalWeight = u1[p3].totalWeight + v32.weight;		
		end;
	end;
	local v33, v34, v35 = pairs(u1);
	while true do
		local v36, v37 = v33(v34, v35);
		if v36 then

		else
			break;
		end;
		local l__count__38 = v37.count;
		local v39 = 1 - 1;
		while true do
			if u2[v37[v39].anim.AnimationId] == nil then
				l__Humanoid__2:LoadAnimation(v37[v39].anim);
				u2[v37[v39].anim.AnimationId] = true;
			end;
			if 0 <= 1 then
				if v39 < l__count__38 then

				else
					break;
				end;
			elseif l__count__38 < v39 then

			else
				break;
			end;
			v39 = v39 + 1;		
		end;	
	end;
end;
function configureAnimationSetOld(p10, p11)
	if u1[p10] ~= nil then
		local v40, v41, v42 = pairs(u1[p10].connections);
		while true do
			local v43, v44 = v40(v41, v42);
			if v43 then

			else
				break;
			end;
			v42 = v43;
			v44:disconnect();		
		end;
	end;
	u1[p10] = {};
	u1[p10].count = 0;
	u1[p10].totalWeight = 0;
	u1[p10].connections = {};
	local u4 = true;
	local v45, v46 = pcall(function()
		u4 = game:GetService("StarterPlayer").AllowCustomAnimations;
	end);
	if not v45 then
		u4 = true;
	end;
	local v47 = script:FindFirstChild(p10);
	if u4 then
		if v47 ~= nil then
			table.insert(u1[p10].connections, v47.ChildAdded:connect(function(p12)
				configureAnimationSet(p10, p11);
			end));
			table.insert(u1[p10].connections, v47.ChildRemoved:connect(function(p13)
				configureAnimationSet(p10, p11);
			end));
			local v48 = 1;
			local v49, v50, v51 = pairs(v47:GetChildren());
			while true do
				local v52, v53 = v49(v50, v51);
				if v52 then

				else
					break;
				end;
				v51 = v52;
				if v53:IsA("Animation") then
					table.insert(u1[p10].connections, v53.Changed:connect(function(p14)
						configureAnimationSet(p10, p11);
					end));
					u1[p10][v48] = {};
					u1[p10][v48].anim = v53;
					local l__Weight__54 = v53:FindFirstChild("Weight");
					if l__Weight__54 == nil then
						u1[p10][v48].weight = 1;
					else
						u1[p10][v48].weight = l__Weight__54.Value;
					end;
					u1[p10].count = u1[p10].count + 1;
					u1[p10].totalWeight = u1[p10].totalWeight + u1[p10][v48].weight;
					v48 = v48 + 1;
				end;			
			end;
		end;
	end;
	if u1[p10].count <= 0 then
		local v55, v56, v57 = pairs(p11);
		while true do
			local v58, v59 = v55(v56, v57);
			if v58 then

			else
				break;
			end;
			v57 = v58;
			u1[p10][v58] = {};
			u1[p10][v58].anim = Instance.new("Animation");
			u1[p10][v58].anim.Name = p10;
			u1[p10][v58].anim.AnimationId = v59.id;
			u1[p10][v58].weight = v59.weight;
			u1[p10].count = u1[p10].count + 1;
			u1[p10].totalWeight = u1[p10].totalWeight + v59.weight;		
		end;
	end;
	local v60, v61, v62 = pairs(u1);
	while true do
		local v63, v64 = v60(v61, v62);
		if v63 then

		else
			break;
		end;
		local l__count__65 = v64.count;
		local v66 = 1 - 1;
		while true do
			l__Humanoid__2:LoadAnimation(v64[v66].anim);
			if 0 <= 1 then
				if v66 < l__count__65 then

				else
					break;
				end;
			elseif l__count__65 < v66 then

			else
				break;
			end;
			v66 = v66 + 1;		
		end;	
	end;
end;
local u5 = {
	idle = { {
			id = "http://www.roblox.com/asset/?id=507766666", 
			weight = 1
		}, {
			id = "http://www.roblox.com/asset/?id=507766951", 
			weight = 1
		}, {
			id = "http://www.roblox.com/asset/?id=507766388", 
			weight = 9
		} }, 
	walk = { {
			id = "http://www.roblox.com/asset/?id=507777826", 
			weight = 10
		} }, 
	run = { {
			id = "http://www.roblox.com/asset/?id=507767714", 
			weight = 10
		} }, 
	swim = { {
			id = "http://www.roblox.com/asset/?id=507784897", 
			weight = 10
		} }, 
	swimidle = { {
			id = "http://www.roblox.com/asset/?id=507785072", 
			weight = 10
		} }, 
	jump = { {
			id = "http://www.roblox.com/asset/?id=507765000", 
			weight = 10
		} }, 
	fall = { {
			id = "http://www.roblox.com/asset/?id=507767968", 
			weight = 10
		} }, 
	climb = { {
			id = "http://www.roblox.com/asset/?id=507765644", 
			weight = 10
		} }, 
	sit = { {
			id = "http://www.roblox.com/asset/?id=2506281703", 
			weight = 10
		} }
};
function scriptChildModified(p15)
	local v67 = u5[p15.Name];
	if v67 ~= nil then
		configureAnimationSet(p15.Name, v67);
	end;
end;
script.ChildAdded:connect(scriptChildModified);
script.ChildRemoved:connect(scriptChildModified);
for v68, v69 in pairs(u5) do
	configureAnimationSet(v68, v69);
end;
local u6 = "";
local u7 = false;
local u8 = nil;
local u9 = nil;
local u10 = nil;
local u11 = nil;
local u12 = nil;
function stopAllAnimations()
	local v70 = u6;
	if u7 then
		v70 = "idle";
		u7 = false;
	end;
	u6 = "";
	u8 = nil;
	if u9 ~= nil then
		u9:disconnect();
	end;
	if u10 ~= nil then
		u10:Stop();
		u10:Destroy();
		u10 = nil;
	end;
	if u11 ~= nil then
		u11:disconnect();
	end;
	if u12 ~= nil then
		u12:Stop();
		u12:Destroy();
		u12 = nil;
	end;
	return v70;
end;
local u13 = l__ScaleDampeningPercent__9;
function getHeightScale()
	if l__Humanoid__2 then

	else
		return 1;
	end;
	if not l__Humanoid__2.AutomaticScalingEnabled then
		return 1;
	end;
	local v71 = l__Humanoid__2.HipHeight / 2;
	if u13 == nil then
		u13 = script:FindFirstChild("ScaleDampeningPercent");
	end;
	if u13 ~= nil then
		v71 = 1 + (l__Humanoid__2.HipHeight - 2) * u13.Value / 2;
	end;
	return v71;
end;
local function u14(p16)
	return p16 * 1.25 / getHeightScale();
end;
local function u15(p17)
	local v72 = u14(p17);
	local v73 = 0.0001;
	local v74 = 0.0001;
	local v75 = v72 / 0.5;
	local v76 = v72 / 1;
	if v72 <= 0.5 then
		v73 = 1;
	elseif v72 < 1 then
		local v77 = (v72 - 0.5) / 0.5;
		v73 = 1 - v77;
		v74 = v77;
		v75 = 1;
		v76 = 1;
	else
		v74 = 1;
	end;
	u10:AdjustWeight(v73);
	u12:AdjustWeight(v74);
	u10:AdjustSpeed(v75);
	u12:AdjustSpeed(v76);
end;
local u16 = 1;
function setAnimationSpeed(p18)
	if u6 == "walk" then
		u15(p18);
		return;
	end;
	if p18 ~= u16 then
		u16 = p18;
		u10:AdjustSpeed(u16);
	end;
end;
local u17 = v3 or v4;
function keyFrameReachedFunc(p19)
	if p19 == "End" then
		if u6 == "walk" then
			if u17 == true then

			else
				u12.TimePosition = 0;
				u10.TimePosition = 0;
				return;
			end;
			if u12.Looped ~= true then
				u12.TimePosition = 0;
			end;
			if u10.Looped ~= true then
				u10.TimePosition = 0;
				return;
			end;
		else
			local v78 = u6;
			if u7 then
				if u10.Looped then
					return;
				end;
				v78 = "idle";
				u7 = false;
			end;
			playAnimation(v78, 0.15, l__Humanoid__2);
			setAnimationSpeed(u16);
		end;
	end;
end;
function rollAnimation(p20)
	local v79 = math.random(1, u1[p20].totalWeight);
	local v80 = 1;
	while true do
		if u1[p20][v80].weight < v79 then

		else
			break;
		end;
		v79 = v79 - u1[p20][v80].weight;
		v80 = v80 + 1;	
	end;
	return v80;
end;
local function u18(p21, p22, p23, p24)
	if p21 ~= u8 then
		if u10 ~= nil then
			u10:Stop(p23);
			u10:Destroy();
		end;
		if u12 ~= nil then
			u12:Stop(p23);
			u12:Destroy();
			if u17 == true then
				u12 = nil;
			end;
		end;
		u16 = 1;
		u10 = p24:LoadAnimation(p21);
		u10.Priority = Enum.AnimationPriority.Core;
		u10:Play(p23);
		u6 = p22;
		u8 = p21;
		if u9 ~= nil then
			u9:disconnect();
		end;
		u9 = u10.KeyframeReached:connect(keyFrameReachedFunc);
		if p22 == "walk" then
			u12 = p24:LoadAnimation(u1.run[rollAnimation("run")].anim);
			u12.Priority = Enum.AnimationPriority.Core;
			u12:Play(p23);
			if u11 ~= nil then
				u11:disconnect();
			end;
			u11 = u12.KeyframeReached:connect(keyFrameReachedFunc);
		end;
	end;
end;
function playAnimation(p25, p26, p27)
	u18(u1[p25][rollAnimation(p25)].anim, p25, p26, p27);
	u7 = false;
end;
function playEmote(p28, p29, p30)
	u18(p28, p28.Name, p29, p30);
	u7 = true;
end;
local u19 = v5 or v6;
local u20 = "Standing";
function onRunning(p31)
	local v81 = u19;
	if v81 then
		v81 = u7 and l__Humanoid__2.MoveDirection == Vector3.new(0, 0, 0);
	end;
	if (v81 and l__Humanoid__2.WalkSpeed or 0.75) < p31 then
		playAnimation("walk", 0.2, l__Humanoid__2);
		setAnimationSpeed(p31 / 16);
		u20 = "Running";
		return;
	end;
	if not u7 then
		playAnimation("idle", 0.2, l__Humanoid__2);
		u20 = "Standing";
	end;
end;
function onDied()
	u20 = "Dead";
end;
local u21 = 0;
function onJumping()
	playAnimation("jump", 0.1, l__Humanoid__2);
	u21 = 0.31;
	u20 = "Jumping";
end;
function onClimbing(p32)
	playAnimation("climb", 0.1, l__Humanoid__2);
	setAnimationSpeed(p32 / 5);
	u20 = "Climbing";
end;
function onGettingUp()
	u20 = "GettingUp";
end;
function onFreeFall()
	if u21 <= 0 then
		playAnimation("fall", 0.2, l__Humanoid__2);
	end;
	u20 = "FreeFall";
end;
function onFallingDown()
	u20 = "FallingDown";
end;
function onSeated()
	u20 = "Seated";
end;
function onPlatformStanding()
	u20 = "PlatformStanding";
end;
function onSwimming(p33)
	if 1 < p33 then

	else
		playAnimation("swimidle", 0.4, l__Humanoid__2);
		u20 = "Standing";
		return;
	end;
	playAnimation("swim", 0.4, l__Humanoid__2);
	setAnimationSpeed(p33 / 10);
	u20 = "Swimming";
end;
local u22 = 0;
function stepAnimate(p34)
	u22 = p34;
	if 0 < u21 then
		u21 = u21 - (p34 - u22);
	end;
	if u20 == "FreeFall" then
		if u21 <= 0 then
			playAnimation("fall", 0.2, l__Humanoid__2);
			return;
		end;
	end;
	if u20 == "Seated" then
		playAnimation("sit", 0.5, l__Humanoid__2);
		return;
	end;
	if u20 == "Running" then
		playAnimation("walk", 0.2, l__Humanoid__2);
		return;
	end;
	if u20 ~= "Dead" then
		if u20 ~= "GettingUp" then
			if u20 ~= "FallingDown" then
				if u20 ~= "Seated" then
					if u20 == "PlatformStanding" then
						stopAllAnimations();
					end;
				else
					stopAllAnimations();
				end;
			else
				stopAllAnimations();
			end;
		else
			stopAllAnimations();
		end;
	else
		stopAllAnimations();
	end;
end;
l__Humanoid__2.Died:connect(onDied);
l__Humanoid__2.Running:connect(onRunning);
l__Humanoid__2.Jumping:connect(onJumping);
l__Humanoid__2.Climbing:connect(onClimbing);
l__Humanoid__2.GettingUp:connect(onGettingUp);
l__Humanoid__2.FreeFalling:connect(onFreeFall);
l__Humanoid__2.FallingDown:connect(onFallingDown);
l__Humanoid__2.Seated:connect(onSeated);
l__Humanoid__2.PlatformStanding:connect(onPlatformStanding);
l__Humanoid__2.Swimming:connect(onSwimming);
if l__Parent__1.Parent ~= nil then
	playAnimation("idle", 0.1, l__Humanoid__2);
	u20 = "Standing";
end;
while l__Parent__1.Parent ~= nil do
	local v82, v83 = wait(0.1);
	stepAnimate(v83);
end;
