Just use the MDFB script in burst mode for a few seconds (set your camera to continuous mode and enable bracketing before starting the script) and for each motion detection you will get a few images, each with different exposure according to your bracketing setup. A lightning will of course be present only in the first shot.
If you want only one shot for each motion detection and different exposure each time, then you need to modify the script a bit. In this case each shot will have a different kind of a lightning.