-- Check if the player can run commands

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
