function stopLoopedSounds()sRunning:Stop()sClimbing:Stop()sSwimming:Stop()end Humanoid.Died:connect(onDied)Humanoid.Running:connect(onRunning)Humanoid.Swimming:connect(onSwimming)Humanoid.Climbing:connect(onClimbing)Humanoid.Jumping:connect(function(U)onStateNoStop(U,sJumping)prevState="\074\117\109\112"end)Humanoid.GettingUp:connect(function(U)stopLoopedSounds()onStateNoStop(U,sGettingUp)prevState="\071\101\116\085\112"end)Humanoid.FreeFalling:connect(function(U)stopLoopedSounds()onStateFall(U,sFreeFalling)prevState="\070\114\101\101\070\097\108\108"end)Humanoid.FallingDown:connect(function(U)stopLoopedSounds()end)Humanoid.StateChanged:connect(function(U,I)if not(I.Name=="\068\101\097\100"or I.Name=="\082\117\110\110\105\110\103"or I.Name=="\082\117\110\110\105\110\103\078\111\080\104\121\115\105\099\115"or I.Name=="\083\119\105\109\109\105\110\103"or I.Name=="\074\117\109\112\105\110\103"or I.Name=="\071\101\116\116\105\110\103\085\112"or I.Name=="\070\114\101\101\102\097\108\108"or I.Name=="\070\097\108\108\105\110\103\068\111\119\110")then stopLoopedSounds()end end)


function stopLoopedSounds()
	sRunning:Stop() 
	sClimbing:Stop()
	sSwimming:Stop()
end

Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Swimming:connect(onSwimming)
Humanoid.Climbing:connect(onClimbing)
Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
Humanoid.StateChanged:connect(function(old, new) 
	if not (new.Name == "Dead" or 
			new.Name == "Running" or 
			new.Name == "RunningNoPhysics" or 
			new.Name == "Swimming" or 
			new.Name == "Jumping" or 
			new.Name == "GettingUp" or 
			new.Name == "Freefall" or 
			new.Name == "FallingDown") then
		stopLoopedSounds()
	end
end)

