script_enemy_main{

   	let CSD = GetCurrentScriptDirectory;
    	let ImgBoss = CSD ~ "system\spook.png";
        let bg = CSD ~ "system\stagebg.png";
	let musics = CSD ~ "Music\outro.mp3";
	let alpha = 255;

	@Initialize{
		SetLife(1);
		SetDamageRate(1,1);
	        SetInvincibility(600);
		LoadMusic(musics);
		PlayMusic(musics);
		maakaf;
	}

	@MainLoop{
		yield;
	}

	@DrawLoop{
		SetTexture(ImgBoss);
		SetAlpha(alpha);
		SetGraphicAngle(0,0,0);
		SetGraphicScale(0.7,0.7);
		SetRenderState(ALPHA);
		SetGraphicRect(0,0,128,128);
       		DrawGraphic(GetX, GetY);
	}

   	@BackGround
    	{

    	}

	task maakaf{
		SetMovePosition01(GetEnemyX-30,GetEnemyY-30,0.5);
		wait(60);
		explosioncustom;
		alpha=0;
		wait(120);
		AddLife(-10);
	}

	#include_function ".\Hwfunctions.txt"
}