if(stage==5){

SetGraphicScale(1,1);
SetPerspectiveClip(0,2000);
SetAlpha(255);
SetFog(300,800,0,0,0);
SetViewTo(0,basev+viewv,viewh);
SetViewFrom(50,viewx,viewy);
WriteZBuffer(true);
UseZBuffer(true);

//END
	SetColor(80,80,120); SetAlpha(255); SetGraphicScale(1,1);
	SetTexture(BGend); SetGraphicRect(0,0,3000,2000);
	SetGraphicAngle(0,90,0); DrawGraphic3D(-1400,0,0);
	SetColor(255,255,255);

let bgrepeat=0;
//CEILING
	loop(10){
	SetColor(80,80,120); 
	SetAlpha(255); SetGraphicScale(1,1);
	SetTexture(BGceiling); SetGraphicRect(0,0+vscroll,300,200+vscroll);
	SetGraphicAngle(90,90,0); DrawGraphic3D(bgrepeat,350,0);
	bgrepeat-=200;
}

SetColor(80,80,120); 
let bgrepeat=0;
loop(2){
//PATH
	SetAlpha(255); SetGraphicScale(1,1); SetTexture(BGpath);
	SetGraphicRect(0,0+vscroll,300,500+vscroll);
	SetGraphicAngle(90,90,0); DrawGraphic3D(bgrepeat,0,0);

//BAMBOO
	SetAlpha(255); SetGraphicScale(1,1); SetTexture(BGbamboo);
	SetGraphicAngle(0,180,180);
	SetGraphicRect(0+hscroll,0,500+hscroll,400); DrawGraphic3D(bgrepeat,200,120); DrawGraphic3D(bgrepeat,200,-120);
	SetGraphicRect(150+hscroll,0,650+hscroll,400); DrawGraphic3D(bgrepeat,200,140); DrawGraphic3D(bgrepeat,200,-140);
	SetGraphicRect(300+hscroll,0,800+hscroll,400); DrawGraphic3D(bgrepeat,200,160); DrawGraphic3D(bgrepeat,200,-160);
bgrepeat-=500;
} //loop 2x

//BUSHES
let i=0;
	while(i<length(bush)){
	SetAlpha(255); SetGraphicScale(0.8,1); SetTexture(BGbush);
	SetGraphicRect(0,0,200,100);
	SetGraphicAngle(0,40,180);
	if(bush[i]<=200 && bushrandomx[i]<0){ DrawGraphic3D(bush[i],50,bushrandomx[i]); }
	SetGraphicAngle(0,140,180);
	if(bush[i]<=200 && bushrandomx[i]>0){ DrawGraphic3D(bush[i],50,bushrandomx[i]); }
	i++;
	}

//CANOPY
let i=0;
	while(i<length(canopy)){
	SetAlpha(255); SetGraphicScale(1,1);
	if(canopygraphic[i]==1){ SetTexture(BGcanopy1); }
	if(canopygraphic[i]==2){ SetTexture(BGcanopy2); }
	if(canopygraphic[i]==3){ SetTexture(BGcanopy3); }
	SetGraphicRect(0,0,400,300);
	SetGraphicAngle(180,90,0);
	if(canopy[i]<=200){ DrawGraphic3D(canopy[i],160,0); }
	i++;
	}
}