task NuclearShot(type,x,y,nangle,speed,maxscale,distance,minscale,color,kill,bomb){
	/*Usage :Credit:From TLC
	type 1:Normal 2:Orbit 3:Dissoloved
	xy  lanching coordinate or polar coordinatw
	nangl angle(for type 2:intial direction)
	speed speed(type2:rotation-speed.if -1then inversed.Slow down if use decimal point)
	mxsc Maximun Size
	dista Distance from enemy when rotation(type2only,other should use 0)
	misc Minimum Size(type3only,other should use 0)
	color Self Explanatory
	kill  hitbox
	bomb  bomb-resist.
	*/
	let nuff2 = ObjPrim_Create(OBJ_SPRITE_2D);
	let nuff  = ObjPrim_Create(OBJ_SPRITE_2D);
	let shff  = ObjShot_Create(OBJ_SHOT);
ObjShot_Regist(shff);
	let img   = GetCurrentScriptDirectory~"Nuclear.png";
	let uv1   = [0,256,512,768,0,256,512,768];
	let uv2   = [0,0,0,0,256,256,256,256];
	let uv3   = [256,512,768,1024,256,512,768,1024];
	let uv4   = [256,256,256,256,512,512,512,512];
	let colorC;
	let MinX=0;
let MinY=0;
let MaxX=GetStgFrameWidth;
let MaxY=GetStgFrameHeight;
	let r=255;
	let g=255;
	let b=255;
	let scale = 0;
	let scp   = 0;
	let killC = 0;
	let distanceC = 0;
	let grazeF = false;
	
	//LoadGraphic(img);
	
	alternative(color)
	case("RED"){colorC=0}
	case("ORANGE"){colorC=1}
	case("YELLOW"){colorC=2}
	case("GREEN"){colorC=3}
	case("AQUA"){colorC=4}
	case("BLUE"){colorC=5}
	case("PURPLE"){colorC=6}
	case("WHITE"){colorC=7}
	
	ObjRender_SetPosition(nuff,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
	ObjPrim_SetTexture(nuff,img);
	ObjRender_SetBlendType(nuff,BLEND_ADD_RGB);
	ObjPrim_SetPrimitiveType(nuff,PRIMITIVE_TRIANGLESTRIP);
	ObjRender_SetScaleXYZ(nuff,scale,scale,scale);
	ObjMove_SetSpeed(nuff,0);
	ObjMove_SetAngle(nuff,nangle);
	ObjRender_SetAngleXYZ(nuff,0,0,nangle);
	Obj_SetRenderPriorityI(nuff,30);
	ObjPrim_SetVertexCount(nuff,4);
	ObjPrim_SetVertexPosition(nuff,0,-128,-128,0);
	ObjPrim_SetVertexPosition(nuff,1,-128,128,0);
	ObjPrim_SetVertexPosition(nuff,2,128,-128,0);
	ObjPrim_SetVertexPosition(nuff,3,128,128,0);
ascent(i in 0..4){
	  ObjPrim_SetVertexColor(nuff,i,r,g,b);
	  ObjPrim_SetVertexAlpha(nuff,i,128);	
	  }
	//ObjEffect_SetVertexColor(nuff,0,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff,1,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff,2,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff,3,125,r,g,b);

	ObjPrim_SetVertexUVT(nuff,0,uv1[colorC],uv2[colorC]);
	ObjPrim_SetVertexUVT(nuff,1,uv1[colorC],uv4[colorC]);
	ObjPrim_SetVertexUVT(nuff,2,uv3[colorC],uv2[colorC]);
	ObjPrim_SetVertexUVT(nuff,3,uv3[colorC],uv4[colorC]);
	
	ObjRender_SetPosition(nuff2,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
	ObjPrim_SetTexture(nuff2,img);
	ObjRender_SetBlendType(nuff2,BLEND_ADD_RGB);
	ObjPrim_SetPrimitiveType(nuff2,PRIMITIVE_TRIANGLESTRIP);
	ObjRender_SetScaleXYZ(nuff2,scale,scale,scale);
	ObjMove_SetSpeed(nuff2,0);
	ObjMove_SetAngle(nuff2,nangle);
	ObjRender_SetAngleXYZ(nuff2,0,0,nangle);
	Obj_SetRenderPriorityI(nuff2,40);
	ObjPrim_SetVertexCount(nuff2,4);
	ObjPrim_SetVertexPosition(nuff2,0,-128,-128,0);
	ObjPrim_SetVertexPosition(nuff2,1,-128,128,0);
	ObjPrim_SetVertexPosition(nuff2,2,128,-128,0);
	ObjPrim_SetVertexPosition(nuff2,3,128,128,0);
ascent(i in 0..4){
	  ObjPrim_SetVertexColor(nuff2,i,r,g,b);
	  ObjPrim_SetVertexAlpha(nuff2,i,128);	
	  }
	//ObjEffect_SetVertexColor(nuff2,0,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff2,1,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff2,2,125,r,g,b);
	//ObjEffect_SetVertexColor(nuff2,3,125,r,g,b);
	ObjPrim_SetVertexUVT(nuff2,0,uv1[colorC],uv2[colorC]);
	ObjPrim_SetVertexUVT(nuff2,1,uv1[colorC],uv4[colorC]);
	ObjPrim_SetVertexUVT(nuff2,2,uv3[colorC],uv2[colorC]);
	ObjPrim_SetVertexUVT(nuff2,3,uv3[colorC],uv4[colorC]);
	
	ObjMove_SetPosition(shff,x,y);
	ObjMove_SetSpeed(shff,speed);
	ObjMove_SetAngle(shff,nangle);
	ObjRender_SetAlpha(shff,0);
	ObjShot_SetIntersectionEnable(shff,false);
	ObjShot_SetAutoDelete(shff,false);
	ObjShot_SetSpellResist(shff,bomb);
	ObjShot_SetGraphic(shff,1);
	
	loop(15){
		ObjRender_SetPosition(nuff,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
		ObjRender_SetPosition(nuff2,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
		if(type!=2){
			scale+=(maxscale/15);
			ObjRender_SetScaleXYZ(nuff,scale,scale,scale);
			ObjRender_SetScaleXYZ(nuff2,scale,scale,scale);
		}
		if(type==3){
			ObjMove_SetSpeed(shff,speed);
		}
		yield;
	}
	
	loop{
		let gnx = ObjMove_GetX(nuff);
		let gny = ObjMove_GetY(nuff);
		let gsx = ObjMove_GetX(shff);
		let gsy = ObjMove_GetY(shff);
		
		if(ObjEnemy_GetInfo(Enemy, INFO_LIFE)<=1){
			Obj_Delete(shff);
			Obj_Delete(nuff);
			Obj_Delete(nuff2);
			break;
		}else{
			//SetCollisionB(gsx,gsy,scale*120);
ObjShot_SetIntersectionLine(shff,gsx,gsy,scale*120);
		}
		
		ObjRender_SetPosition(nuff,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
		ObjRender_SetPosition(nuff2,ObjMove_GetX(shff),ObjMove_GetY(shff),0);
		
		if(type==2&&maxscale>scale){
			scale+=(maxscale/500);
			ObjRender_SetScaleXYZ(nuff,scale,scale,scale);
			ObjRender_SetScaleXYZ(nuff2,scale,scale,scale);
		}
		//SetCollisionB(gsx,gsy,scale*120);
		ObjEnemy_SetIntersectionCircleToPlayer(shff,gsx,gsy,scale*120);
		scp++;
		ObjRender_SetScaleXYZ(nuff,scale+0.03*sin(scp*10),scale+0.03*sin(scp*10),scale);
		
		alternative(type)
		case(1){
			ObjMove_SetSpeed(shff,speed);
			ObjMove_SetPosition(nuff2,gnx,gny);
		}
		case(2){
			if(distance>distanceC){distanceC++}
			ObjMove_SetPosition(shff,EnemyX+distanceC*sin(nangle+(scp/2*speed)),EnemyY+distanceC*cos(nangle+(scp/2*speed)));
			ObjMove_SetPosition(nuff,gsx,gsy);
			ObjMove_SetPosition(nuff2,gsx,gsy);
		}
		case(3){
			ObjMove_SetSpeed(shff,speed);
			ObjMove_SetPosition(nuff,gsx,gsy);
			ObjMove_SetPosition(nuff2,gsx,gsy);
			if(minscale<scale){scale-=0.005;}
			ObjRender_SetScaleXYZ(nuff,scale,scale,scale);
			ObjRender_SetScaleXYZ(nuff2,scale,scale,scale);
		}
		
		killC++;
		if(killC>kill&&kill>=0){
			Obj_Delete(nuff);
			Obj_Delete(nuff2);
			Obj_Delete(shff);
			break;
		}
		
		if(scale<=0){
			Obj_Delete(nuff);
			Obj_Delete(nuff2);
			Obj_Delete(shff);
			break;
		}
		
		//if(OnBomb==true&&bomb==false){
		//	Obj_Delete(nuff);
		//	Obj_Delete(nuff2);
		//	Obj_Delete(shff);
		//	break;
		//}
		if(type!=2){
			if(gny>=MaxY+250||gny<=MinY-250||gnx>=MaxX+250||gny<=MinY-250){
				Obj_Delete(nuff);
				Obj_Delete(nuff2);
				Obj_Delete(shff);
				break;
			}
		}
		if(Obj_IsDeleted(nuff)==true){break;}
		if(Obj_IsDeleted(shff)==true){
			Obj_Delete(nuff2);
			Obj_Delete(nuff);
			break;
		}
		yield;
	}
}