In my early days in Second Life I picked up a free full-perm lightning bug script by Ama Omega; its name was Foxfire.
The script was set to turn fireflies on at sundown and off when the sun came back up. I managed to change that so they were active 24/7.
As fireflies go, Ama's weren't bad, but Sweetie (a recurring character in
Chey's Second Life Blog) wanted to tweak them. Fireflies she said, weren't yellow, but yellow-green. These didn't stay on quite long enough-- and they were too dense and not quite wide-ranging enough. And oh, yes, didn't fireflies come out only at night/ Why did these flash all day?
I had her apply color to a prim and, by doing some calculations, soon had the script making fireflies of the same shade. With Sweetie over my shoulder, I tweaked the script, making the flashes last a little longer, thinning the field of fireflies, and dispersing them over a wider range. Then I stayed online through a full four-hour Second Life day cycle and discovered just the right moment to turn them on (real life fireflies start just at dusk). Real life fireflies stop flashing after a few hours, but I conveniently ignored that fact of biology and turned them off when the sum was just above the horizon. Then we spent an evening walking around Whimsy finding the old fireflies and replacing them with the new ones. Using beacons made that relatively easy.
Here's my post about the process.
Below you'll find my modified firefly script, and below that Ama's original Foxfire Script. Ama did a great job, but I think you'll find my tweaks make for a nicer effect.
You can drop the script into rocks, trees, or just about anywhere. Fireflies will come out as it begins to grow dark and disappear before it's fully light. Please note, The fireflies are responding to the Second Life day cycle on your sim, and not to your viewer setting of midday, morning, evening, or midnight.