game.Players.CharacterAutoLoads=false game.Players.PlayerAdded:connect(function(g)g.CharacterAdded:connect(function(G)local F=time()while not G:FindFirstChild("\072\117\109\097\110\111\105\100")and time()-F<10 do wait(.2)end if time()-F>=10 then print("\084\105\109\101\111\117\116 \101\114\114\111\114")else G.Humanoid.Died:connect(function()if type(OnDeath_Callback)=="\102\117\110\099\116\105\111\110"then OnDeath_Callback(g)end wait(SpawnDelayTime)g:LoadCharacter(true)end)end end)wait(2)g:LoadCharacter(true)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	-- Wait until Humanoid is present or amount of time waiting is more than 10 seconds


		if ((time()-t) >= 10) then print("Timeout error") -- If for some reason the Humanoid isn't found in 10 seconds, break the loop. No need to be stuck in an endless and useless loop.


		else
			c.Humanoid.Died:connect(function()
				if (type(OnDeath_Callback) == "function") then OnDeath_Callback(p) end
				wait(SpawnDelayTime)
				p:LoadCharacter(true)
			end)


		end
	end)
	wait(2)
	p:LoadCharacter(true)
end)
