What i want is, when a player spawn, he gets invencible by 10 seconds. This means the player will not take any damage by enemy after 10 seconds after his respawn. Can you help me ?
Anyway thanks

god = 0 addhook("hit","godhit") function godhit(id,h) 	if god == 1 then 		return 1 	else 		return 0 	end end addhook("spawn","hmm") function hmm() 	god = 1 	timer(10000,"reGod") end function reGod() 	god = 0 end
GodMode = {} for i = 1, 32 do 	GodMode[i] = -1 end addhook("spawn", "OnSpawn") OnSpawn = function(id) 	GodMode[id] = 0 end addhook("second", "EverySecond") EverySecond = function() 	local T = player(0, "tableliving") 	for _, id in pairs(T) do 		if GodMode[id] >= 0 and GodMode[id] < 10 then 			GodMode[id] = GodMode[id] + 1 		elseif GodMode[id] >= 10 then 			GodMode[id] = -1 		end 	end end addhook("hit", "OnHit") OnHit = function(id) 	if GodMode[id] >= 0 then 		return 1 	end end