local passId = 253208787 function isAuthenticated(player) return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId) end game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then SpawnDelayTime = 0 OnDeath_Callback = function(player) print(player.Name .. " died. Awaiting respawn.") 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("Timeout error") 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)
Lines 1-7