function UTIL.WaitForValidCharacter(b)local V=b.Character if not V or not V.Parent or not V:FindFirstChild("\072\117\109\097\110\111\105\100")or V.Humanoid.Health<=0 then b.CharacterAdded:wait()wait(0)V=b.Character end return V end

function UTIL.WaitForValidCharacter(player)
	local character = player.Character
	if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
		player.CharacterAdded:wait()
		wait(0) --NOTE: Necessary for server scripts executing on the same event
		character = player.Character
	end
	return character
end

