This script renders an ambient occlusion pass with VRay from any scene - without changing anything. There is no need to prepare the scene in any way either.
VRay 1.5 or higher is required for the script to run!
If you are using VRay 1.46, there is an older version available, without dirtmap features.