there is no need of a script:
In the standard canon menu, select "Custom timer" mode (the one that allows you to shoot X images after X seconds). Specify a delay of a few seconds, and the number of shots you wan (for example, 5).
Then, in CHDK menu, go under "extra photo operations" - "bracketing in continuous mode" and set a value for "TV bracketing value" (for example, 2 Ev)
This means that the camera shoots 5 shots, and in the meanwhile CHDK changes the exposure of 2 Ev.
this gives you the effect you want