Hi scott, I'm not aware of any script for doing that right now. It's currently kind of difficult for a script to interrogate things about an object's specific shape like if it is planar or not so that would probably be difficult to script. The Transform > Orient tool can do that kind of thing with just a couple of clicks though so using the regular Orient command is probably your best bet.