local e=script local C=e.Parent local D=Game:GetService("\068\101\098\114\105\115")repeat Wait(0)until script and(script.Parent and script.Parent.ClassName=="\077\111\100\101\108")local m for e,C in pairs(C:GetChildren())do if C and(C.ClassName=="\072\117\109\097\110\111\105\100"and C.Health>.001)then m=C end end local S=C:Clone()coroutine.resume(coroutine.create(function()if C and(m and(m:FindFirstChild("\083\116\097\116\117\115")and not(m:FindFirstChild("\083\116\097\116\117\115")):FindFirstChild("\065\118\097\108\105\098\108\101\083\112\097\119\110\115")))then SpawnModel=Instance.new("\077\111\100\101\108")SpawnModel.Parent=m:FindFirstChild("\083\116\097\116\117\115")SpawnModel.Name="\065\118\097\108\105\098\108\101\083\112\097\119\110\115"else SpawnModel=(m:FindFirstChild("\083\116\097\116\117\115")):FindFirstChild("\065\118\097\108\105\098\108\101\083\112\097\119\110\115")end function FindSpawn(e)local C=e:GetChildren()for e=1,#C,1 do if C[e].className=="\083\112\097\119\110\076\111\099\097\116\105\111\110"then local D=Instance.new("\086\101\099\116\111\114\051\086\097\108\117\101",SpawnModel)D.Value=C[e].Position D.Name=C[e].Duration end FindSpawn(C[e])end end FindSpawn(Game.Workspace)local e=SpawnModel:GetChildren()if#e>0 then local m=e[math.random(1,#e)]local S=Instance.new("\070\111\114\099\101\070\105\101\108\100")S.Parent=C S.Name="\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100"D:AddItem(S,m.Name)C:MoveTo(m.Value+Vector3.new(0,3.5,0))else if C:FindFirstChild("\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100")then(C:FindFirstChild("\083\112\097\119\110\070\111\114\099\101\070\105\101\108\100")):Destroy()end C:MoveTo(Vector3.new(0,115,0))end end))function Respawn()Wait(5)S.Parent=C.Parent S:MakeJoints();(S:FindFirstChild("\072\101\097\100")):MakeJoints();(S:FindFirstChild("\084\111\114\115\111")):MakeJoints()C:remove()end m.Died:connect(Respawn)
--[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]
--
local AdvancedRespawnScript = script
local Bob = AdvancedRespawnScript.Parent
local GameDerbis = Game:GetService("Debris")
repeat
	Wait(0)
until script and script.Parent and script.Parent.ClassName == "Model"
local BobHumanoid
for _, Child in pairs(Bob:GetChildren()) do
	if Child and Child.ClassName == "Humanoid" and Child.Health > 0.001 then
		BobHumanoid = Child
	end
end
local Respawndant = Bob:Clone()
coroutine.resume(coroutine.create(function()
	if
		Bob
		and BobHumanoid
		and BobHumanoid:FindFirstChild("Status")
		and not BobHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")
	then
		SpawnModel = Instance.new("Model")
		SpawnModel.Parent = BobHumanoid:FindFirstChild("Status")
		SpawnModel.Name = "AvalibleSpawns"
	else
		SpawnModel = BobHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")
	end
	function FindSpawn(SearchValue)
		local PartsArchivable = SearchValue:GetChildren()
		for AreaSearch = 1, #PartsArchivable do
			if PartsArchivable[AreaSearch].className == "SpawnLocation" then
				local PositionValue = Instance.new("Vector3Value", SpawnModel)
				PositionValue.Value = PartsArchivable[AreaSearch].Position
				PositionValue.Name = PartsArchivable[AreaSearch].Duration
			end
			FindSpawn(PartsArchivable[AreaSearch])
		end
	end
	FindSpawn(Game.Workspace)
	local SpawnChilden = SpawnModel:GetChildren()
	if #SpawnChilden > 0 then
		local SpawnItself = SpawnChilden[math.random(1, #SpawnChilden)]
		local RespawningForceField = Instance.new("ForceField")
		RespawningForceField.Parent = Bob
		RespawningForceField.Name = "SpawnForceField"
		GameDerbis:AddItem(RespawningForceField, SpawnItself.Name)
		Bob:MoveTo(SpawnItself.Value + Vector3.new(0, 3.5, 0))
	else
		if Bob:FindFirstChild("SpawnForceField") then
			Bob:FindFirstChild("SpawnForceField"):Destroy()
		end
		Bob:MoveTo(Vector3.new(0, 115, 0))
	end
end))
function Respawn()
	Wait(5)
	Respawndant.Parent = Bob.Parent
	Respawndant:MakeJoints()
	Respawndant:FindFirstChild("Head"):MakeJoints()
	Respawndant:FindFirstChild("Torso"):MakeJoints()
	Bob:remove()
end
BobHumanoid.Died:connect(Respawn)
