local T=script.Parent local S=T:WaitForChild("\072\117\109\097\110\111\105\100")local E,u=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 y,J=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 V,n=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)local q=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(T,S)if T~=nil then if S==nil then return 0 end else return 0 end local E=T.count local u=0 while true do if T[u].anim.AnimationId==S.AnimationId then return u end if true then if u<E then else break end elseif E<u then else break end u=u+1 end return 0 end local d={}local C={}function configureAnimationSet(T,E)if d[T]~=nil then local S,E,u=pairs(d[T].connections)while true do local T,y=S(E,u)if T then else break end u=T y:disconnect()end end d[T]={}d[T].count=0 d[T].totalWeight=0 d[T].connections={}local u=true local y,J=pcall(function()u=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not y then u=true end local V=script:FindFirstChild(T)if u then if V~=nil then table.insert(d[T].connections,V.ChildAdded:connect(function(S)configureAnimationSet(T,E)end))table.insert(d[T].connections,V.ChildRemoved:connect(function(S)configureAnimationSet(T,E)end))local S,u,y=pairs(V:GetChildren())while true do local J,V=S(u,y)if J then else break end y=J if V:IsA("\065\110\105\109\097\116\105\111\110")then local S=1 local u=V:FindFirstChild("\087\101\105\103\104\116")if u~=nil then S=u.Value end d[T].count=d[T].count+1 local y=d[T].count d[T][y]={}d[T][y].anim=V d[T][y].weight=S d[T].totalWeight=d[T].totalWeight+d[T][y].weight table.insert(d[T].connections,V.Changed:connect(function(S)configureAnimationSet(T,E)end))table.insert(d[T].connections,V.ChildAdded:connect(function(S)configureAnimationSet(T,E)end))table.insert(d[T].connections,V.ChildRemoved:connect(function(S)configureAnimationSet(T,E)end))end end end end if d[T].count<=0 then local S,u,y=pairs(E)while true do local E,J=S(u,y)if E then else break end y=E d[T][E]={}d[T][E].anim=Instance.new("\065\110\105\109\097\116\105\111\110")d[T][E].anim.Name=T d[T][E].anim.AnimationId=J.id d[T][E].weight=J.weight d[T].count=d[T].count+1 d[T].totalWeight=d[T].totalWeight+J.weight end end local n,q,j=pairs(d)while true do local T,E=n(q,j)if T then else break end local u=E.count local y=0 while true do if C[E[y].anim.AnimationId]==nil then S:LoadAnimation(E[y].anim)C[E[y].anim.AnimationId]=true end if true then if y<u then else break end elseif u<y then else break end y=y+1 end end end function configureAnimationSetOld(T,E)if d[T]~=nil then local S,E,u=pairs(d[T].connections)while true do local T,y=S(E,u)if T then else break end u=T y:disconnect()end end d[T]={}d[T].count=0 d[T].totalWeight=0 d[T].connections={}local u=true local y,J=pcall(function()u=(game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")).AllowCustomAnimations end)if not y then u=true end local V=script:FindFirstChild(T)if u then if V~=nil then table.insert(d[T].connections,V.ChildAdded:connect(function(S)configureAnimationSet(T,E)end))table.insert(d[T].connections,V.ChildRemoved:connect(function(S)configureAnimationSet(T,E)end))local S=1 local u,y,J=pairs(V:GetChildren())while true do local V,n=u(y,J)if V then else break end J=V if n:IsA("\065\110\105\109\097\116\105\111\110")then table.insert(d[T].connections,n.Changed:connect(function(S)configureAnimationSet(T,E)end))d[T][S]={}d[T][S].anim=n local u=n:FindFirstChild("\087\101\105\103\104\116")if u==nil then d[T][S].weight=1 else d[T][S].weight=u.Value end d[T].count=d[T].count+1 d[T].totalWeight=d[T].totalWeight+d[T][S].weight S=S+1 end end end end if d[T].count<=0 then local S,u,y=pairs(E)while true do local E,J=S(u,y)if E then else break end y=E d[T][E]={}d[T][E].anim=Instance.new("\065\110\105\109\097\116\105\111\110")d[T][E].anim.Name=T d[T][E].anim.AnimationId=J.id d[T][E].weight=J.weight d[T].count=d[T].count+1 d[T].totalWeight=d[T].totalWeight+J.weight end end local n,q,C=pairs(d)while true do local T,E=n(q,C)if T then else break end local u=E.count local y=0 while true do S:LoadAnimation(E[y].anim)if true then if y<u then else break end elseif u<y then else break end y=y+1 end end end local j={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}},toolnone={{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\056\051\055\053";weight=10}};toolslash={{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\050\050\054\051\053\053\049\052",weight=10}};toollunge={{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\050\050\054\051\056\055\054\055",weight=10}};wave={{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\048\050\051\057";weight=10}},point={{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\048\052\053\051",weight=10}},dance={{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\049\048\049\057";weight=10},{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\049\057\053\053";weight=10},{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\050\049\048\052";weight=10}},dance2={{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\054\048\052\051",weight=10},{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\054\055\050\048",weight=10},{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\054\056\055\057";weight=10}},dance3={{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\050\054\056";weight=10};{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\052\053\049";weight=10},{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\054\050\051",weight=10}},laugh={{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\048\056\049\056",weight=10}};cheer={{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\048\054\055\055";weight=10}}}function scriptChildModified(T)local S=j[T.Name]if S~=nil then configureAnimationSet(T.Name,S)end end script.ChildAdded:connect(scriptChildModified)script.ChildRemoved:connect(scriptChildModified)for T,S in pairs(j)do configureAnimationSet(T,S)end local x=""local b={wave=false;point=false,dance=true,dance2=true,dance3=true,laugh=false;cheer=false}local X=false local z=nil local F=nil local N=nil local M=nil local k=nil function stopAllAnimations()local T=x if b[T]~=nil then if b[T]==false then T="\105\100\108\101"end end if X then T="\105\100\108\101"X=false end x=""z=nil if F~=nil then F:disconnect()end if N~=nil then N:Stop()N:Destroy()N=nil end if M~=nil then M:disconnect()end if k~=nil then k:Stop()k:Destroy()k=nil end return T end local Z=q function getHeightScale()if S then else return 1 end if not S.AutomaticScalingEnabled then return 1 end local T=S.HipHeight/2 if Z==nil then Z=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 Z~=nil then T=1+((S.HipHeight-2)*Z.Value)/2 end return T end local function P(T)local S=(T*1.25)/getHeightScale()local E=.0001 local u=.0001 local y=S/.5 local J=S/1 if S<=.5 then E=1 elseif S<1 then local T=(S-.5)/.5 E=1-T u=T y=1 J=1 else u=1 end N:AdjustWeight(E)k:AdjustWeight(u)N:AdjustSpeed(y)k:AdjustSpeed(J)end local c=1 function setAnimationSpeed(T)if x=="\119\097\108\107"then P(T)return end if T~=c then c=T N:AdjustSpeed(c)end end local A=E or u function keyFrameReachedFunc(T)if T=="\069\110\100"then if x=="\119\097\108\107"then if A==true then else k.TimePosition=0 N.TimePosition=0 return end if k.Looped~=true then k.TimePosition=0 end if N.Looped~=true then N.TimePosition=0 return end else local T=x if b[T]~=nil then if b[T]==false then T="\105\100\108\101"end end if X then if N.Looped then return end T="\105\100\108\101"X=false end playAnimation(T,.15,S)setAnimationSpeed(c)end end end function rollAnimation(T)local S=math.random(1,d[T].totalWeight)local E=1 while true do if d[T][E].weight<S then else break end S=S-d[T][E].weight E=E+1 end return E end local function O(T,S,E,u)if T~=z then if N~=nil then N:Stop(E)N:Destroy()end if k~=nil then k:Stop(E)k:Destroy()if A==true then k=nil end end c=1 N=u:LoadAnimation(T)N.Priority=Enum.AnimationPriority.Core N:Play(E)x=S z=T if F~=nil then F:disconnect()end F=N.KeyframeReached:connect(keyFrameReachedFunc)if S=="\119\097\108\107"then k=u:LoadAnimation(d.run[rollAnimation("\114\117\110")].anim)k.Priority=Enum.AnimationPriority.Core k:Play(E)if M~=nil then M:disconnect()end M=k.KeyframeReached:connect(keyFrameReachedFunc)end end end function playAnimation(T,S,E)O(d[T][rollAnimation(T)].anim,T,S,E)X=false end function playEmote(T,S,E)O(T,T.Name,S,E)X=true end local U=""function toolKeyFrameReachedFunc(T)if T=="\069\110\100"then playToolAnimation(U,0,S)end end local f=nil local r=nil local B=nil function playToolAnimation(T,S,E,u)local y=d[T][rollAnimation(T)].anim if f~=y then if r~=nil then r:Stop()r:Destroy()S=0 end r=E:LoadAnimation(y)if u then r.Priority=u end r:Play(S)U=T f=y B=r.KeyframeReached:connect(toolKeyFrameReachedFunc)end end function stopToolAnimations()if B~=nil then B:disconnect()end U=""f=nil if r~=nil then r:Stop()r:Destroy()r=nil end return U end local h=y or J local I="\083\116\097\110\100\105\110\103"function onRunning(T)local E=h if E then E=X and S.MoveDirection==Vector3.new(0,0,0)end if(E and S.WalkSpeed or.75)<T then playAnimation("\119\097\108\107",.2,S)setAnimationSpeed(T/16)I="\082\117\110\110\105\110\103"return end if b[x]==nil then if not X then playAnimation("\105\100\108\101",.2,S)I="\083\116\097\110\100\105\110\103"end end end function onDied()I="\068\101\097\100"end local W=0 function onJumping()playAnimation("\106\117\109\112",.1,S)W=.31 I="\074\117\109\112\105\110\103"end function onClimbing(T)playAnimation("\099\108\105\109\098",.1,S)setAnimationSpeed(T/5)I="\067\108\105\109\098\105\110\103"end function onGettingUp()I="\071\101\116\116\105\110\103\085\112"end function onFreeFall()if W<=0 then playAnimation("\102\097\108\108",.2,S)end I="\070\114\101\101\070\097\108\108"end function onFallingDown()I="\070\097\108\108\105\110\103\068\111\119\110"end function onSeated()I="\083\101\097\116\101\100"end function onPlatformStanding()I="\080\108\097\116\102\111\114\109\083\116\097\110\100\105\110\103"end function onSwimming(T)if 1<T then else playAnimation("\115\119\105\109\105\100\108\101",.4,S)I="\083\116\097\110\100\105\110\103"return end playAnimation("\115\119\105\109",.4,S)setAnimationSpeed(T/10)I="\083\119\105\109\109\105\110\103"end local l="\078\111\110\101"function animateTool()if l=="\078\111\110\101"then playToolAnimation("\116\111\111\108\110\111\110\101",.1,S,Enum.AnimationPriority.Idle)return end if l=="\083\108\097\115\104"then playToolAnimation("\116\111\111\108\115\108\097\115\104",0,S,Enum.AnimationPriority.Action)return end if l=="\076\117\110\103\101"then else return end playToolAnimation("\116\111\111\108\108\117\110\103\101",0,S,Enum.AnimationPriority.Action)end function getToolAnim(T)local S,E,u=ipairs(T:GetChildren())while true do S(E,u)if S then else break end u=S if E.Name=="\116\111\111\108\097\110\105\109"then if E.className=="\083\116\114\105\110\103\086\097\108\117\101"then return E end end end return nil end local R=0 local p=0 function stepAnimate(E)R=E if 0<W then W=W-(E-R)end if I=="\070\114\101\101\070\097\108\108"then if W<=0 then playAnimation("\102\097\108\108",.2,S)else if I=="\083\101\097\116\101\100"then playAnimation("\115\105\116",.5,S)return end if I=="\082\117\110\110\105\110\103"then playAnimation("\119\097\108\107",.2,S)elseif I~="\068\101\097\100"then if I~="\071\101\116\116\105\110\103\085\112"then if I~="\070\097\108\108\105\110\103\068\111\119\110"then if I~="\083\101\097\116\101\100"then if I=="\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 else if I=="\083\101\097\116\101\100"then playAnimation("\115\105\116",.5,S)return end if I=="\082\117\110\110\105\110\103"then playAnimation("\119\097\108\107",.2,S)elseif I~="\068\101\097\100"then if I~="\071\101\116\116\105\110\103\085\112"then if I~="\070\097\108\108\105\110\103\068\111\119\110"then if I~="\083\101\097\116\101\100"then if I=="\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 local u=T:FindFirstChildOfClass("\084\111\111\108")if u then if u:FindFirstChild("\072\097\110\100\108\101")then else stopToolAnimations()l="\078\111\110\101"f=nil p=0 return end else stopToolAnimations()l="\078\111\110\101"f=nil p=0 return end local y=getToolAnim(u)if y then l=y.Value y.Parent=nil p=E+.3 end if p<E then p=0 l="\078\111\110\101"end animateTool()end S.Died:connect(onDied)S.Running:connect(onRunning)S.Jumping:connect(onJumping)S.Climbing:connect(onClimbing)S.GettingUp:connect(onGettingUp)S.FreeFalling:connect(onFreeFall)S.FallingDown:connect(onFallingDown)S.Seated:connect(onSeated)S.PlatformStanding:connect(onPlatformStanding)S.Swimming:connect(onSwimming);(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.Chatted:connect(function(T)local E=""if string.sub(T,1,3)=="\047\101 "then E=string.sub(T,4)elseif string.sub(T,1,7)=="\047\101\109\111\116\101 "then E=string.sub(T,8)end if I=="\083\116\097\110\100\105\110\103"and b[E]~=nil then playAnimation(E,.1,S)end end)local a=V or n;(script:WaitForChild("\080\108\097\121\069\109\111\116\101")).OnInvoke=function(T)if I~="\083\116\097\110\100\105\110\103"then return end if b[T]~=nil then playAnimation(T,.1,S)if a then return true,N else return true end end if typeof(T)~="\073\110\115\116\097\110\099\101"or not T:IsA("\065\110\105\109\097\116\105\111\110")then return false end playEmote(T,.1,S)if a then return true,N end return true end if T.Parent~=nil then playAnimation("\105\100\108\101",.1,S)I="\083\116\097\110\100\105\110\103"end while T.Parent~=nil do local T,S=wait(.1)stepAnimate(S)end


local l__Parent__1 = script.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);
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
		} }, 
	toolnone = { {
			id = "http://www.roblox.com/asset/?id=507768375", 
			weight = 10
		} }, 
	toolslash = { {
			id = "http://www.roblox.com/asset/?id=522635514", 
			weight = 10
		} }, 
	toollunge = { {
			id = "http://www.roblox.com/asset/?id=522638767", 
			weight = 10
		} }, 
	wave = { {
			id = "http://www.roblox.com/asset/?id=507770239", 
			weight = 10
		} }, 
	point = { {
			id = "http://www.roblox.com/asset/?id=507770453", 
			weight = 10
		} }, 
	dance = { {
			id = "http://www.roblox.com/asset/?id=507771019", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507771955", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507772104", 
			weight = 10
		} }, 
	dance2 = { {
			id = "http://www.roblox.com/asset/?id=507776043", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507776720", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507776879", 
			weight = 10
		} }, 
	dance3 = { {
			id = "http://www.roblox.com/asset/?id=507777268", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507777451", 
			weight = 10
		}, {
			id = "http://www.roblox.com/asset/?id=507777623", 
			weight = 10
		} }, 
	laugh = { {
			id = "http://www.roblox.com/asset/?id=507770818", 
			weight = 10
		} }, 
	cheer = { {
			id = "http://www.roblox.com/asset/?id=507770677", 
			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 = {
	wave = false, 
	point = false, 
	dance = true, 
	dance2 = true, 
	dance3 = true, 
	laugh = false, 
	cheer = false
};
local u8 = false;
local u9 = nil;
local u10 = nil;
local u11 = nil;
local u12 = nil;
local u13 = nil;
function stopAllAnimations()
	local v70 = u6;
	if u7[v70] ~= nil then
		if u7[v70] == false then
			v70 = "idle";
		end;
	end;
	if u8 then
		v70 = "idle";
		u8 = false;
	end;
	u6 = "";
	u9 = nil;
	if u10 ~= nil then
		u10:disconnect();
	end;
	if u11 ~= nil then
		u11:Stop();
		u11:Destroy();
		u11 = nil;
	end;
	if u12 ~= nil then
		u12:disconnect();
	end;
	if u13 ~= nil then
		u13:Stop();
		u13:Destroy();
		u13 = nil;
	end;
	return v70;
end;
local u14 = 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 u14 == nil then
		u14 = script:FindFirstChild("ScaleDampeningPercent");
	end;
	if u14 ~= nil then
		v71 = 1 + (l__Humanoid__2.HipHeight - 2) * u14.Value / 2;
	end;
	return v71;
end;
local function u15(p16)
	local v72 = p16 * 1.25 / getHeightScale();
	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;
	u11:AdjustWeight(v73);
	u13:AdjustWeight(v74);
	u11:AdjustSpeed(v75);
	u13:AdjustSpeed(v76);
end;
local u16 = 1;
function setAnimationSpeed(p17)
	if u6 == "walk" then
		u15(p17);
		return;
	end;
	if p17 ~= u16 then
		u16 = p17;
		u11:AdjustSpeed(u16);
	end;
end;
local u17 = v3 or v4;
function keyFrameReachedFunc(p18)
	if p18 == "End" then
		if u6 == "walk" then
			if u17 == true then

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

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

	else
		playAnimation("swimidle", 0.4, l__Humanoid__2);
		u24 = "Standing";
		return;
	end;
	playAnimation("swim", 0.4, l__Humanoid__2);
	setAnimationSpeed(p37 / 10);
	u24 = "Swimming";
end;
local u26 = "None";
function animateTool()
	if u26 == "None" then
		playToolAnimation("toolnone", 0.1, l__Humanoid__2, Enum.AnimationPriority.Idle);
		return;
	end;
	if u26 == "Slash" then
		playToolAnimation("toolslash", 0, l__Humanoid__2, Enum.AnimationPriority.Action);
		return;
	end;
	if u26 == "Lunge" then

	else
		return;
	end;
	playToolAnimation("toollunge", 0, l__Humanoid__2, Enum.AnimationPriority.Action);
end;
function getToolAnim(p38)
	local v83, v84, v85 = ipairs(p38:GetChildren());
	while true do
		v83(v84, v85);
		if v83 then

		else
			break;
		end;
		v85 = v83;
		if v84.Name == "toolanim" then
			if v84.className == "StringValue" then
				return v84;
			end;
		end;	
	end;
	return nil;
end;
local u27 = 0;
local u28 = 0;
function stepAnimate(p39)
	u27 = p39;
	if 0 < u25 then
		u25 = u25 - (p39 - u27);
	end;
	if u24 == "FreeFall" then
		if u25 <= 0 then
			playAnimation("fall", 0.2, l__Humanoid__2);
		else
			if u24 == "Seated" then
				playAnimation("sit", 0.5, l__Humanoid__2);
				return;
			end;
			if u24 == "Running" then
				playAnimation("walk", 0.2, l__Humanoid__2);
			elseif u24 ~= "Dead" then
				if u24 ~= "GettingUp" then
					if u24 ~= "FallingDown" then
						if u24 ~= "Seated" then
							if u24 == "PlatformStanding" then
								stopAllAnimations();
							end;
						else
							stopAllAnimations();
						end;
					else
						stopAllAnimations();
					end;
				else
					stopAllAnimations();
				end;
			else
				stopAllAnimations();
			end;
		end;
	else
		if u24 == "Seated" then
			playAnimation("sit", 0.5, l__Humanoid__2);
			return;
		end;
		if u24 == "Running" then
			playAnimation("walk", 0.2, l__Humanoid__2);
		elseif u24 ~= "Dead" then
			if u24 ~= "GettingUp" then
				if u24 ~= "FallingDown" then
					if u24 ~= "Seated" then
						if u24 == "PlatformStanding" then
							stopAllAnimations();
						end;
					else
						stopAllAnimations();
					end;
				else
					stopAllAnimations();
				end;
			else
				stopAllAnimations();
			end;
		else
			stopAllAnimations();
		end;
	end;
	local v86 = l__Parent__1:FindFirstChildOfClass("Tool");
	if v86 then
		if v86:FindFirstChild("Handle") then

		else
			stopToolAnimations();
			u26 = "None";
			u20 = nil;
			u28 = 0;
			return;
		end;
	else
		stopToolAnimations();
		u26 = "None";
		u20 = nil;
		u28 = 0;
		return;
	end;
	local v87 = getToolAnim(v86);
	if v87 then
		u26 = v87.Value;
		v87.Parent = nil;
		u28 = p39 + 0.3;
	end;
	if u28 < p39 then
		u28 = 0;
		u26 = "None";
	end;
	animateTool();
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);
game:GetService("Players").LocalPlayer.Chatted:connect(function(p40)
	local v88 = "";
	if string.sub(p40, 1, 3) == "/e " then
		v88 = string.sub(p40, 4);
	elseif string.sub(p40, 1, 7) == "/emote " then
		v88 = string.sub(p40, 8);
	end;
	if u24 == "Standing" and u7[v88] ~= nil then
		playAnimation(v88, 0.1, l__Humanoid__2);
	end;
end);
local u29 = v7 or v8;
script:WaitForChild("PlayEmote").OnInvoke = function(p41)
	if u24 ~= "Standing" then
		return;
	end;
	if u7[p41] ~= nil then
		playAnimation(p41, 0.1, l__Humanoid__2);
		if u29 then
			return true, u11;
		else
			return true;
		end;
	end;
	if typeof(p41) ~= "Instance" or not p41:IsA("Animation") then
		return false;
	end;
	playEmote(p41, 0.1, l__Humanoid__2);
	if u29 then
		return true, u11;
	end;
	return true;
end;
if l__Parent__1.Parent ~= nil then
	playAnimation("idle", 0.1, l__Humanoid__2);
	u24 = "Standing";
end;
while l__Parent__1.Parent ~= nil do
	local v89, v90 = wait(0.1);
	stepAnimate(v90);
end;
