function fam(x,y,spd,dir,acc,maxspd,life){
	let obj = ObjEnemy_Create(OBJ_ENEMY);
	let shot;
	let c = 0;
	let alpha = 0;
	ObjEnemy_Regist(obj);
	ObjMove_SetPosition(obj,x,y);
	ObjEnemy_SetLife(obj,life);
	ObjEnemy_SetDamageRate(obj,100,100);
	ObjMove_AddPatternA2(obj,0,spd,dir,acc,0,maxspd);
	drawfam;
	drawsprite;
	return obj;

		task drawsprite{
		let fam=ObjPrim_Create(OBJ_SPRITE_2D);
		let spin = 0;
		let f = 0;
		let imgFam = GCSD~"img/servant.png";
		LoadTexture(imgFam);
		ObjPrim_SetTexture(fam,imgFam);
		ObjRender_SetScaleXYZ(fam,1,1,1);
		ObjRender_SetAlpha(fam,192);
		Obj_SetRenderPriority(fam,0.21);
		while(!Obj_IsDeleted(obj)){
		f++;
		if(f<8){ObjSprite2D_SetSourceRect(fam,0,128,28,160);;}
		if(f>=8 && f<16){ObjSprite2D_SetSourceRect(fam,32,128,60,160);;}
		if(f>=16){ObjSprite2D_SetSourceRect(fam,64,128,92,160);;}
		if(f>=24){f=0;}
		if(GetVirtualKeyState(VK_SLOWMOVE) == KEY_HOLD){
		if(alpha>15){alpha-=20;}
		ObjRender_SetAlpha(fam,alpha);
		}
		else{
		if(alpha<245){alpha+=20;}
		ObjRender_SetAlpha(fam,alpha);
		}
		ObjRender_SetPosition(fam,ObjMove_GetX(obj),ObjMove_GetY(obj),0);
		ObjSprite2D_SetDestCenter(fam);
		yield;
		}
		Obj_Delete(fam);
		}


		task drawfam{
		PlaySound("fam",100,0);
		magiccircle(obj,0.5,false);
		while(!Obj_IsDeleted(obj)){
		if(c%4==0 && GetVirtualKeyState(VK_SLOWMOVE) != KEY_HOLD){
		ObjEnemy_SetIntersectionCircleToShot(obj,ObjMove_GetX(obj),ObjMove_GetY(obj),24);
		ObjEnemy_SetIntersectionCircleToPlayer(obj,ObjMove_GetX(obj),ObjMove_GetY(obj),16);
		}
		if(GetVirtualKeyState(VK_SLOWMOVE) == KEY_PUSH)
		{PlaySound("Hidden",90,0);}
		if(GetVirtualKeyState(VK_SLOWMOVE) == KEY_PULL)
		{PlaySound("Sudden",90,0);}
		if(ObjEnemy_GetInfo(obj,INFO_LIFE) <=0){
		PlaySound("famdie",100,0);
		TExplosionA(ObjMove_GetX(obj),ObjMove_GetY(obj),10,0.3);
		Obj_Delete(obj);
		}
		if(ObjMove_GetX(obj)<-64 || ObjMove_GetX(obj)>480 || ObjMove_GetY(obj)<-64 || ObjMove_GetY(obj)>528){
		Obj_Delete(obj);}
		yield;
		}
		}
	}