--This script makes the screen black when the player dies.

Player = script.Parent.Parent.Parent.Parent.Character
s = Player.Humanoid
while true do
if s.Health <= 1 then
script.Parent.Visible = true
script.Parent.Transparency = 1 --Invisible
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.9
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.8
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.7
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.6
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.5
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.4
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.3
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.2
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.1
wait(0.3)
script.Parent.Transparency = script.Parent.Transparency - 0.1 --Completely black screen
wait(999999999999999)
end
wait()
end

