Sound script help

So basically when i die the first time using this script…

local rs = game:GetService(‘ReplicatedStorage’)
local event = rs:WaitForChild(‘SoundPlaying’)
local sound = Instance.new(“Sound”,workspace)
sound.SoundId = ‘rbxassetid://144405051’
sound.Pitch = 0.8
sound.Looped = true
event.OnClientEvent:Connect(function()
if sound.IsPlaying then return end
sound:Play()
end)
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild(‘Humanoid’)
humanoid.Died:Connect(function()
if sound.IsPlaying then
sound:Stop()
end
end)

the song stops when i die, which is what i want, but the second time and the other times after the second time i die, the song just keeps playing which is not what i want.
I also have this script…

local remote = game:GetService(‘ReplicatedStorage’):WaitForChild(‘SoundPlaying’)
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild(‘Humanoid’)then
remote:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)

which is the script i use to start playing the song after touching a specific part. Can you help me so that the song stops playing everytime i die but obviously plays when i touch that specific part.