Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FadedBedey
- SpawnDelay = 1 -- Delay of when died, For example you will respawn 1 second after you die.
- OnDeathDo = function(player)
- end
- game.Players.CharacterAutoLoads = false
- game.Players.PlayerAdded:connect(function(p)
- p.CharacterAdded:connect(function(c)
- local t = time()
- while ((not c:FindFirstChild("Humanoid")) and ((time()-t) < 10)) do wait(0.2) end
- if ((time()-t) >= 10) then print("Timed Error")
- else
- c.Humanoid.Died:connect(function()
- if (type(OnDeathDo) == "function") then OnDeathDo(p) end
- wait(SpawnDelay)
- p:LoadCharacter(true)
- end)
- end
- end)
- wait(2)
- p:LoadCharacter(true)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement