I thought there was a script on here somewhere? might be wrong :/
but Simon's solution works well, I've used it before but Flash
I've not seen a script for a flashlight on here anywhere & I don't think it would be possible anyway unless we can draw masks/shapes with lua & define the brightness of the masked area etc. Ideally this would be much simpler to do in a 3D game engine where you have direct control over the lighting & light sources of each scene.
@Simon: I would call that the simple method... so simple in fact that I would probably never have considered it
