I am setting protection in factions on my command block server using adventure mode. I have a command block setting mode to survival in a certain radius, but within that radius I want a smaller radius set to adventure mode. Is there a way to set what's not in the radius of adventure mode to survival mode?
The entity selector has several arguments I think you'll find useful for this kind of situation. r=6 (as you probably know) targets entities within a spherical radius of 6. rm can be used to specify a minimum radius. and dx dy dz can be used for a rectangular region. https://minecraft.wiki/w/Commands has a nice list and explination of all valid selector arguments.
For your problem, I would use something like
/gamemode 2 @a[r=10,m=0] followed by /gamemode 0 @a[r=5,m=2] but there are many ways to do this with the available selectors