Something like this is generally preferable to the above as it's not using old Gscript. Note that it will only work online.
PHP Code:
function onCreated() {
this.dontBlock();
this.drawOverPlayer();
}
//#CLIENTSIDE
function onCreated() {
if (lighteffectsenabled) {
this.setColorEffect(0, 1, 0, 0.8); // red, green, blue, alpha
} else {
this.hide();
}
}
Give it an image (usually light2.png or light3.png).