local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = playerGui:FindFirstChild("DeathScreenGui")
if not screenGui then
screenGui = Instance.new("ScreenGui")
screenGui.Name = "DeathScreenGui"
screenGui.Parent = playerGui
end
local imageLabel = screenGui:FindFirstChild("DeathImage")
if not imageLabel then
imageLabel = Instance.new("ImageLabel")
imageLabel.Name = "DeathImage"
imageLabel.Size = UDim2.new(1, 0, 1, 0)
imageLabel.Image = "rbxassetid://13804272000"
imageLabel.BackgroundTransparency = 1
imageLabel.Visible = true
imageLabel.Parent = screenGui
end
local sound = playerGui:FindFirstChild("DeathSound")
if not sound then
sound = Instance.new("Sound")
sound.Name = "DeathSound"
sound.SoundId = "rbxassetid://8619297528"
sound.Volume = 1
sound.Looped = false
sound.Parent = playerGui
end
local function onDeath()
imageLabel.Visible = true
sound:Play()
end
local function setupCharacter(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.Died:Connect(onDeath)
end
if player.Character then
setupCharacter(player.Character)
end
player.CharacterAdded:Connect(function(newChar)
imageLabel.Visible = false
sound:Stop()
setupCharacter(newChar)
end)





** You are now Level 5! **