STEP:
image_angle=direction;
if distance_to_object(playerMG1)<170{
speed=0
direction=point_direction(x,y,playerMG1.x,playerMG1.y)
if (ceil(random(9)))=1{
o=instance_create(x+(cos(direction*pi/180)*16),y-(sin(direction*pi/180)*16),bullet)
o.direction=point_direction(x,y,playerMG1.x,playerMG1.y)-5+random(10);
o.speed=10}}
else
{speed=2}