script_spell ZAN
	{
   	let current = GetCurrentScriptDirectory();

        task run()	{
                sai;
            
		End();
	}

		@Initialize
		{
		SetPlayerInvincibility(60);
                run();


		
		}
		@MainLoop
		{   	      	

                   yield;

		}
		@Finalize
		{

		} 

                      angle=180;
             lee=225;
             L=10;
             A=16;
    if(GetKeyState(VK_LEFT)==KEY_HOLD ){angle=225; L=+10; A=18;}
    if(GetKeyState(VK_RIGHT)==KEY_HOLD ){angle=295; L=-10; A=18;}                      
task sai{
                 
               if(!Obj_BeDeleted(objlase)){return;}
                objlase = Obj_Create(OBJ_LASER); 
	        Obj_SetX(objlase, GetPlayerX);
		Obj_SetY(objlase, GetPlayerY-10); 
                Obj_SetAngle(objlase,angle);
	        Obj_SetSpeed(objlase, 20);
                ObjShot_SetGraphic(objlase, 4);
                ObjLaser_SetWidth(objlase,30);
                ObjShot_SetDamage(objlase,50);
                ObjLaser_SetSource(objlase,false);      
             loop(A){   ObjLaser_SetLength(objlase,lee);            
                  Obj_SetAngle(objlase,angle);
                  angle=angle+L;  
	        Obj_SetX(objlase, GetPlayerX);
		Obj_SetY(objlase, GetPlayerY-10);                                    
                 yield;     
               } 

  Obj_Delete(objlase);                       
                  }      

}  }