-- functions


function onDied()
	sDied:Play()
	wait(2.5)
	script.Parent:Destroy()
end

function onState(state, sound)
	if state then
		sound:Play()
	else
		sound:Pause()
	end
end

function onRunning(speed)
	if speed>0 then
		sRunning:Play()
	else
		sRunning:Pause()
	end
end
