function CheckHostID(y)if Run:IsStudio()then return true end if game.CreatorType==Enum.CreatorType.User then if y.UserId==game.CreatorId then return true end elseif game.CreatorType==Enum.CreatorType.Group then if y:GetRankInGroup(game.CreatorId)>=gameRules.HostRank then return true end end for P,X in pairs(gameRules.HostList)do if y.UserId==X then return true end end return false end

function CheckHostID(player)

	-- Is the game running in studio
	if Run:IsStudio() then return true end


	if game.CreatorType == Enum.CreatorType.User then
		-- Is the player the game's owner
		if player.UserId == game.CreatorId then return true end
	elseif game.CreatorType == Enum.CreatorType.Group then
		-- Does the player have a high enough group rank
		if player:GetRankInGroup(game.CreatorId) >= gameRules.HostRank then return true end
	end

	-- Is the player in the game host list
	for _, cID in pairs(gameRules.HostList) do
		if player.UserId == cID then return true end
	end
	return false
end
