//Script by Deevyde Maelstrom of the Brainiacs
//Feel free to do whatever you want with it, but keep this header please :)

integer active;
float suntime;

default //Makes the object visible at night and invisible during the day
{
    state_entry()
    {
        llSetTimerEvent(10);
    }

    timer()
    {
        suntime = llGetTimeOfDay() / 3600;
        if(suntime >= 3 | suntime <= 1 && active == 0)
        {
            llSetLinkAlpha(LINK_SET, 0, ALL_SIDES);
            active = 1;
        }
        else if(suntime < 3 && suntime > 1 && active == 1)
        {
            llSetLinkAlpha(LINK_SET, 1, ALL_SIDES);
            active = 0;
        }
    }
}