Using a script to notify when a Personal Storage device was inserted into Mac
Although not a script, this tiny bit of Swift code, will report any disk insertions either physical or virtual. It may be of assistance to you:

import Foundation
import DiskArbitration

let session = DASessionCreate(CFAllocatorGetDefault().takeRetainedValue())

DARegisterDiskAppearedCallback(
    session!,
    nil,
    { (disk, context) in
        if let name = DADiskGetBSDName(disk) {
            print("Disk inserted: " + String(cString: name))
        }
},
    nil)

DASessionScheduleWithRunLoop(session!, CFRunLoopGetMain(), CFRunLoopMode.defaultMode.rawValue)

RunLoop.main.run()