It's not a script. You set it when you set up the fog, like so:
See those SX, SY thingies?
You can think of that as X speed and Y speed. The higher the number, the faster it moves. As well, the sign determines direction. The directions work like this:
North: + Y value
East: + X value
South: - Y value
West: - X value
And the magnitude determines speed. So -5 is as fast as +5, but in the opposite direction.
I hope that helps. Post back if you still have questions.