Well, on top of my mind, the most important thing is using a motion detection script that half-presses before going into motion detection mode - scripts that don't are very much slower, as the camera wastes time focusing and checking exposure just before shooting (yes, it still wastes some time even if you lock focus and exposure).
I use the script that's available
here, I'd say it does a good job.
You could also check the
various tips to make motion detection faster, but I'd say that, in the case of fireworks, instant shooting isn't
vital, it just shouldn't bee way too slow.
Actually, maybe you want to adjust - as in, increase - the shooting delay, to avoid getting the fireworks when it's still not extended. I'm not sure there's a param for that in the script, but it should be a matter of adding a "sleep" instruction to it if there isn't...
To be sure, you could shoot three or four frames in continuous mode, too.
You want focus to be at infinity, of course, so set manual focus in advance. If you use the built-in "Fireworks" mode, it will do that automatically, but it will also (at least on my camera) expose for 2 seconds at minimum aperture... which I suppose might give you some impressing effects perhaps, but definitely won't "freeze" the fireworks at all!