Day and Night problem

I’m trying to design a day and night cycle for a game I’m working on. However I’m receiving weird problems with my script. If the time of day equals zero (morning) it shows the skybox for night (named dusk in the script). If it equals four (Night) and it is not raining, the rain light skybox is shown with rain effects. Any help would be appreciated.

var morning : Material; 
var noon : Material;
var afternoon : Material;
var evening : Material;
var dusk : Material;
var rainlight : Material;
var raindark : Material;
var Timeofday : int; 
var Minute : int; 
var Sun : GameObject;
var flare : Flare;
static var rain;
var chanceofrain : int;
var timetillrandom : int;

function Update () {
timetillrandom++;
if (timetillrandom == 20000) {
chanceofrain = Random.Range(0, 1);
timetillrandom = 0;
}
if(chanceofrain == 0) {
rain = true;
}
if(chanceofrain == 1) {
rain = false;
}

Minute ++; 
if (Minute == 10000){
Timeofday ++;
Minute = 0;
}
if (Timeofday > 4) {
Timeofday = 0;
}
if (Timeofday == 0 || rain == false) {
RenderSettings.skybox = morning;
Sun.light.intensity = 0.25;
RenderSettings.fog = false;
Sun.light.flare = flare;
Sun.transform.rotation.x = 45.34678;
Sun.transform.rotation.y = 237.4959;
Sun.transform.rotation.z = 243.9325;
}
if (Timeofday == 0 || rain == true) {
RenderSettings.skybox = rainlight;
Sun.light.intensity = 0.23;
Sun.light.flare = null;
RenderSettings.fog = true;
}
if (Timeofday == 1 || rain == false) {
Sun.light.intensity = 0.3;
RenderSettings.skybox = noon;
RenderSettings.fog = false;
Sun.light.flare = flare;
}
if (Timeofday == 1 || rain == true) {
RenderSettings.skybox = rainlight;
Sun.light.flare = null;
Sun.light.intensity = 0.27;
RenderSettings.fog = true;
}
if (Timeofday == 2 || rain == false) {
Sun.light.intensity = 0.29;
RenderSettings.skybox = afternoon;
RenderSettings.fog = false;
Sun.light.flare = flare;
}
if (Timeofday == 2 || rain == true) {
RenderSettings.skybox = rainlight;
Sun.light.flare = null;
Sun.light.intensity = 0.26;
RenderSettings.fog = true;
}
if (Timeofday == 3 || rain == false) {
Sun.light.intensity = 0.20;
RenderSettings.skybox = evening;
RenderSettings.fog = false;
Sun.light.flare = flare;
}
if (Timeofday == 3 || rain == true) {
RenderSettings.skybox = raindark;
Sun.light.flare = null;
Sun.light.intensity = 0.15;
RenderSettings.fog = true;
}
if (Timeofday == 4 || rain == false) {
Sun.light.intensity = 0.14;
RenderSettings.skybox = dusk;
RenderSettings.fog = false;
Sun.light.flare = null;
}
if (Timeofday == 4 || rain == true) {
RenderSettings.skybox = raindark;
Sun.light.flare = null;
Sun.light.intensity = 0.1;
RenderSettings.fog = true;
}

}

Try using && instead of || (you want both conditions true, not anyone of them).

You basically never get pass the two first conditions since rain is either true of false.