BGbush=("\script\Images\3DBackground\Stage 1\Bush.png");
BGpath=("\script\Images\3DBackground\Stage 2\Grass.png");
BGbamboo=("\script\Images\3DBackground\Stage 5\Bamboo.png");
BGcanopy1=("\script\Images\3DBackground\Stage 1\Canopy1.png");
BGcanopy2=("\script\Images\3DBackground\Stage 1\Canopy2.png");
BGcanopy3=("\script\Images\3DBackground\Stage 1\Canopy3.png");
BGceiling=("\script\Images\3DBackground\Stage 1\Ceiling.png");

BGlightray=("\script\Images\3DBackground\Lightray.png");
BGend=("\script\Images\3DBackground\Wall.png");
BGleaf=("\script\Images\3DBackground\Leaf.png");

//Deleting Old Stage 4 Arrays
	while(length(stall1)>0){ stall1=erase(stall1,0); }
	while(length(stallscroll1)>0){ stallscroll1=erase(stallscroll1,0); }
	while(length(stallgraphic1)>0){ stallgraphic1=erase(stallgraphic1,0); }
	
	while(length(stall2)>0){ stall2=erase(stall2,0); }
	while(length(stallscroll2)>0){ stallscroll2=erase(stallscroll2,0); }
	while(length(stallgraphic2)>0){ stallgraphic2=erase(stallgraphic2,0); }	
	
	while(length(bambooscroll)>0){ bambooscroll=erase(bambooscroll,0); }
	while(length(lampscroll)>0){ lampscroll=erase(lampscroll,0); }

//Making New Stage 5 Arrays
let i=0;
	loop(25){
	bushscroll=bushscroll~[0]; bush=bush~[0];
	canopyscroll=canopyscroll~[0]; canopy=canopy~[0];
	canopysprite+=rand_int(1,2); if(canopysprite>3){ canopysprite-=3; }
	canopygraphic=canopygraphic~[canopysprite];
	bushrandomx=bushrandomx~[0]; bushrandomx[i]=randombush2;
	i++;
	}

SetCommonData("InEvent",0);
SetCommonData("BackgroundStop",0);
SetCommonData("Stage",5);
SetCommonData("PlayMusic",1);

bgphase=1;
hscroll=0; vscroll=0; scroll=0;
scrollon=1; scrollspeed=1;

oldscore=GetScore;

newviewx=0; newviewy=0; viewmovetimexy=5;
newviewh=0; newviewv=0; viewmovetimehv=5;
basev=100;

time=0; frame=0;
phase=0; stagephase=1;

CreateEnemyFromFile("script\Functions\fadein.txt",0,0,0,0,0);