Boundry Lines

can someone create a setable line that when you cross turnes npcs hostile till you exit? this would be awesome!!! So i can keep players away from areas