//Shots bounce once

script_enemy_main{

let GRenemy=("\script\Images\Enemies\Ghosts.png");
let SEshots4=("script\SoundEffects\shots4.wav");
let SEmagics5=("script\SoundEffects\magics5.wav");
let SEdeath=("script\SoundEffects\enemydeath1.wav");
let miny=GetClipMinY; let maxy=GetClipMaxY; let minx=GetClipMinX; let maxx=GetClipMaxX;
let cx=GetCenterX; let cy=GetCenterY;
let startx=GetX; let starty=GetY;
let frame=rand_int(0,20); let time=0; let animation=0;
let ani=6;
let scale=0.75;
let shots=0;
let shotcolor=3; let shotspeed=0;
let oldX=0; let oldY=0;
let invincible=125;

let color=GetArgument[0];
let speed=GetArgument[1];
let shot1=0;
let bullet1=[];

if(GetArgument[2]==1){
	if(startx<cx){ SetAngle(0); }
	if(startx>=cx){ SetAngle(180); }
	if(startx>=minx && startx<=maxx){ SetAngle(90); }
}
if(GetArgument[2]==2){
	if(startx<minx){ SetAngle(45); }
	if(startx>maxx){ SetAngle(135); }
}
SetSpeed(2);

@Initialize{
	LoadGraphic("\script\Images\Enemies\Ghosts.png");
	LoadSE("script\SoundEffects\shots4.wav");
	LoadSE("script\SoundEffects\magics5.wav");

	SetInvincibility(10);
	if(GetArgument[2]==1){ SetLife(23); }
	if(GetArgument[2]==2){ SetLife(33); }
	if(GetCommonData("Difficulty")==1){ SetDamageRate(16,3); }
	if(GetCommonData("Difficulty")==2){ SetDamageRate(14,3); }
	if(GetCommonData("Difficulty")==3){ SetDamageRate(12,3); }
	if(GetCommonData("Difficulty")==4){ SetDamageRate(10,3); }
	SetScore(1000);
	SetShotColor(255,255,255);
}

@MainLoop{

if(GetX<=minx-300 || GetX>=maxx+300 || GetY<=miny-32 || GetY>=maxy+300 && frame>=60){ VanishEnemy; }

if((GetX>minx && GetX<maxx) && (GetY>miny && GetY<maxy)){
SetCollisionA(GetX,GetY,32*scale);
SetCollisionB(GetX,GetY,32*scale);


if(GetCommonData("Difficulty")==1){
	if(frame%28==0){
	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle+90);
	Obj_SetSpeed(shot1,speed*0.64);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];

	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle-90);
	Obj_SetSpeed(shot1,speed*0.64);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];
	}
	if(time%30==0){ PlaySE(SEshots4); }
} //Easy

if(GetCommonData("Difficulty")==2){
	if(frame%22==0){
	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle+90);
	Obj_SetSpeed(shot1,speed*0.76);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];

	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle-90);
	Obj_SetSpeed(shot1,speed*0.76);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];
	}
	if(time%20==0){ PlaySE(SEshots4); }
} //Normal

if(GetCommonData("Difficulty")==3){
	if(frame%14==0){
	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle+90);
	Obj_SetSpeed(shot1,speed*0.88);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];

	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle-90);
	Obj_SetSpeed(shot1,speed*0.88);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];
	}
	if(time%15==0){ PlaySE(SEshots4); }
} //Hard

if(GetCommonData("Difficulty")==4){
	if(frame%10==0){
	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle+90);
	Obj_SetSpeed(shot1,speed);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];

	shot1=(Obj_Create(OBJ_SHOT));
	Obj_SetPosition(shot1,GetX,GetY);
	Obj_SetAngle(shot1,GetAngle-90);
	Obj_SetSpeed(shot1,speed);
	ObjShot_SetDelay(shot1,10);
	ObjShot_SetGraphic(shot1,108+color);
	bullet1=bullet1~[shot1];
	}
	if(time%10==0){ PlaySE(SEshots4); }
} //Lunatic


if(GetCommonData("Difficulty")==1 && GetArgument[3]==1){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		SetShotDirectionType(PLAYER);
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		SetShotDirectionType(ABSOLUTE);
	}
i++;
}
} //Aimed bullets

if(GetCommonData("Difficulty")==1 && GetArgument[3]==2){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.6;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx,108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
	}
i++;
}
} //Reflecting bullets

//Easy


if(GetCommonData("Difficulty")==2 && GetArgument[3]==1){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		SetShotDirectionType(PLAYER);
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-8,8),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-8,8),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-8,8),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-8,8),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		SetShotDirectionType(ABSOLUTE);
	}
i++;
}
} //Aimed bullets

if(GetCommonData("Difficulty")==2 && GetArgument[3]==2){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.7;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.02,speedx*rand(0.9,1.1),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
	}
i++;
}
} //Reflecting bullets

//Normal


if(GetCommonData("Difficulty")==3 && GetArgument[3]==1){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		SetShotDirectionType(PLAYER);
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-6,6),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-6,6),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-6,6),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-6,6),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		SetShotDirectionType(ABSOLUTE);
	}
i++;
}
} //Aimed bullets

if(GetCommonData("Difficulty")==3 && GetArgument[3]==2){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*0.85;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
	}
i++;
}
} //Reflecting bullets

//Hard


if(GetCommonData("Difficulty")==4 && GetArgument[3]==1){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		SetShotDirectionType(PLAYER);
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-3,3),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-3,3),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-3,3),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=0;
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-3,3),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		SetShotDirectionType(ABSOLUTE);
	}
i++;
}
} //Aimed bullets

if(GetCommonData("Difficulty")==4 && GetArgument[3]==2){
let i=0;
while(i<length(bullet1)){
	if(Obj_BeDeleted(bullet1[i])){
	bullet1=erase(bullet1,i);
	i--;
	}
	else{
	let obj=bullet1[i];
		if(Obj_GetX(bullet1[i])<=minx){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetX(bullet1[i])>=maxx){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=180-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])<=miny){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
		if(Obj_GetY(bullet1[i])>=maxy){
		let speedx=Obj_GetSpeed(bullet1[i])*1;
		let anglex=-Obj_GetAngle(bullet1[i]);
			CreateShot02(Obj_GetX(bullet1[i]),Obj_GetY(bullet1[i]),0,anglex+rand(-10,10),0.03,speedx*rand(0.8,1.2),108+color+12,10);
		Obj_Delete(bullet1[i]);
		PlaySE(SEmagics5);
		}
	}
i++;
}
} //Reflecting bullets

//Lunatic

} //Onscreen


oldX=GetX;
oldY=GetY;
frame++;
time++;
animation++;
if(animation>=ani*6){ animation=0; }
if(GetTimeOfInvincibility<25 && invincible>0){ invincible=GetTimeOfInvincibility*5; }

}

@DrawLoop{
	SetTexture(GRenemy);
		if(animation>=ani*0 && animation<ani*1){ SetGraphicRect(0,0,52,150); }
		if(animation>=ani*1 && animation<ani*2){ SetGraphicRect(52,0,104,150); }
		if(animation>=ani*2 && animation<ani*3){ SetGraphicRect(104,0,156,150); }
		if(animation>=ani*3 && animation<ani*4){ SetGraphicRect(156,0,208,150); }
		if(animation>=ani*4 && animation<ani*5){ SetGraphicRect(208,0,260,150); }
		if(animation>=ani*5 && animation<ani*6){ SetGraphicRect(260,0,312,150); }
	SetGraphicAngle(0,0,GetAngle+90);
	if(GetArgument[0]>=1 && GetArgument[0]<=3){ SetColor(200,100,0); }
	if(GetArgument[0]>=7 && GetArgument[0]<=9){ SetColor(0,100,200); }
	SetGraphicScale(1,1);
	SetRenderState(ADD);
	DrawGraphic(GetX,GetY);
}

@Finalize{
if(BeVanished==false){
PlaySE(SEdeath);
	loop(3){ CreateEnemyFromFile("script\Functions\itemscore.txt",GetX+rand(-40,40),GetY+rand(-40,40),0,0,0); }
	loop(2){ CreateEnemyFromFile("script\Functions\itempoint.txt",GetX+rand(-40,40),GetY+rand(-40,40),0,0,0); }
	loop(2){ CreateEnemyFromFile("script\Functions\itempower.txt",GetX+rand(-40,40),GetY+rand(-40,40),0,0,0); }
#include_function "script/Functions/PlayerTypeBonus.txt";
}
}

}