	let speed = 1;
	
	SetCameraFocusX(0);
	SetCameraFocusY(0);
	SetCameraFocusZ(0);
	SetCameraRadius(700);
    SetCameraElevationAngle(0);
	SetCameraAzimuthAngle(90);
	StageBG;
	Elevator;
	CloudSpawner;
	SetFogParam(250, 1000, 1, 1, 5);
	
	
task CloudSpawner{
	loop{
	Cloud;
		loop(210){
			if(GetCommonData("Fade",0)==1){
			loop{yield;}
			}
		yield;
		}
	}
}

task Elevator{
	let boop = 0;
	let boop2 = 0;
	let cap = 2;
	ascent(i in 0..900){
	SetCameraRoll(2*sin(i));
	SetCameraFocusX(15*sin(i/100));
	boop = i;
	if(speed<cap){speed+=0.01;}
	loop(1){yield;}
	}
	
	loop{
	if(GetCommonData("Downwards",1)==1){break;}
	}
	let scale = 0;
	loop{
	SetCameraRadius(700-(boop2*2));
	SetCameraRoll(2*sin(boop));
	if(scale<1){scale+=0.01;}
	boop2+=scale;
	boop++;
	speed-=0.0004;
	if(boop2>300){SetCommonData("Fade2", 1);}
	if(boop2>320){break;}
	yield;
	}
	let wat = 0;
	SetCommonData("SecondPortion",1);
	SetCameraRadius(800);
	SetCameraFocusY(50);
	SetFogParam(500,1100, 0, 0, 0);
	loop{
	if(GetCommonData("Downwards",1)==2){break;}
	yield;
	}
	loop(100){
	speed+=0.001;
	yield;
	}
}


task StageBG{
let mult = 0;
let obj = ObjPrim_Create(OBJ_SPRITE_3D);
ObjPrim_SetTexture(obj, GetCurrentScriptDirectory ~ "./img/NightForest.png");
Obj_SetRenderPriorityI(obj,20);
ObjRender_SetAngleX(obj,-30);
ObjRender_SetScaleXYZ(obj,2,2,1.5);
ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
loop{
ObjSprite3D_SetSourceDestRect(obj,0,0+(mult*speed),256*2,256*3+(mult*speed));
if(GetCommonData("SecondPortion",0)==1){Obj_Delete(obj); StageBG2; break;}
mult++;
yield;
}
}

task StageBG2{
let mult = 0;
let obj = ObjPrim_Create(OBJ_SPRITE_3D);
ObjPrim_SetTexture(obj, GetCurrentScriptDirectory ~ "./img/forest.png");
Obj_SetRenderPriorityI(obj,21);
ObjRender_SetAngleX(obj,-70);
ObjRender_SetScaleXYZ(obj,1,1,1.5);
ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
ObjRender_SetPosition(obj, 0, 100, 100);

let obj2 = ObjPrim_Create(OBJ_SPRITE_3D);
ObjPrim_SetTexture(obj2, GetCurrentScriptDirectory ~ "./img/forest2.png");
Obj_SetRenderPriorityI(obj2,21);
ObjRender_SetAngleX(obj2,-70);
ObjRender_SetScaleXYZ(obj2,3,3,1.5);
ObjRender_SetBlendType(obj2,BLEND_ADD_ARGB);
ObjRender_SetPosition(obj2, 0, 100, 100);
	
loop{
ObjSprite3D_SetSourceDestRect(obj,0,0+(mult*speed),256*4,256*5+(mult*speed));
ObjSprite3D_SetSourceDestRect(obj2,0+(mult*speed/4),0,256*3+(mult*speed/4),256*2);
mult++;
yield;
}
}

task Cloud{
let mult = 0;
let obj = ObjPrim_Create(OBJ_SPRITE_3D);
let obj2 = ObjPrim_Create(OBJ_SPRITE_3D);
ObjPrim_SetTexture(obj, GetCurrentScriptDirectory ~ "./img/CloudStrife.png");
ObjPrim_SetTexture(obj2, GetCurrentScriptDirectory ~ "./img/DarkCloudStrife.png");
Obj_SetRenderPriorityI(obj,20);
Obj_SetRenderPriorityI(obj2,20);
ObjRender_SetScaleXYZ(obj,1,1,1.5);
ObjRender_SetScaleXYZ(obj2,1.2,1.2,1.5);
ObjSprite3D_SetSourceDestRect(obj,0,0,256,256);
ObjSprite3D_SetSourceDestRect(obj2,0,0,256,256);
ObjRender_SetBlendType(obj,BLEND_SUBTRACT);
ObjRender_SetBlendType(obj2,BLEND_ALPHA);
ObjRender_SetAlpha(obj, 122);
ObjRender_SetAlpha(obj2, 255);
ObjRender_SetAngleXYZ(obj,-15, 0, 0);
ObjRender_SetAngleXYZ(obj2,-15, 0, 0);
ObjRender_SetPosition(obj, rand(-160, 160), GetStgFrameHeight/2+300, 25);
ObjRender_SetPosition(obj2, 0, 0, 100);
loop{
ObjRender_SetPosition(obj, ObjRender_GetX(obj),ObjRender_GetY(obj)-2, -mult/5);
ObjRender_SetPosition(obj2, ObjRender_GetX(obj),ObjRender_GetY(obj)+100, -mult/5);
if(GetCommonData("Fade",0)==1){Obj_Delete(obj); Obj_Delete(obj2);}
mult++;
yield;
}
}