Mario goomba enemy help!

i made this game but something is wrong with my goomba
i added this as to mario

onClipEvent (load) {
jumpCount = 0;
jumpSpeed = 11;
jumpMaxHeight = 10;
fallspeed = 6;
runspeed = 5;
}
onClipEvent (enterFrame) {
stop();
if (Key.isDown(Key.DOWN)) {
speed = 0;
moving = false;
movingb = false;
this.gotoAndStop(“crouch”);
} else if (Key.isDown(Key.CONTROL)) {
speed = 0;
moving = false;
movingb = false;
this.gotoAndStop(“attack”);
} else if (Key.isDown(Key.LEFT)) {
speed = -runspeed;
movingb = true;
_root.maps._x -= speed;
this._xscale = -100;
this.gotoAndStop(“run”);
moving = true;
} else if (Key.isDown(Key.RIGHT)) {
speed = runspeed;
movingb = true;
_root.maps._x -= speed;
moving = true;
this._xscale = 100;
this.gotoAndStop(“run”);
} else {
movingb = true;
speed = 0;
moving = false;
this.gotoAndStop(“idle”);
}
if (Key.isDown(Key.SPACE) && (_root.maps.ground.hitTest(this._x, this._y, true) && movingb)) {
jumping = true;
}
if (Key.isDown(Key.SPACE)) {
jumpSpeed -= .75;
} else if (!Key.isDown(Key.SPACE)) {
jumping = false;
}
if (jumping){
gotoAndStop(“jump”);
if (jumpCount<=jumpMaxHeight) {
jumpCount++;
_root.maps._y += jumpSpeed;
} else if (jumpCount>jumpMaxHeight && jumpSpeed<1) {
_root.maps._y -= fallspeed;
}
}
if (!_root.maps.ground.hitTest(this._x, this._y, true) && !jumping) {
_root.maps._y -= fallspeed;
}
if (_root.maps.ground.hitTest(this._x, this._y, true)) {
jumpCount = 0;
jumping = false;
jumpSpeed = 11;
if (_root.goomba.hitTest(this.jump)) {
if (vel_y<=1) {
_root.goomba.gotoAndPlay(“dead”);
_root.goomba.xspeed = 0;
_root.counter.play();
vel_y = 10;
}
}
}
}

and my goomba i put this

onClipEvent (load) {
xspeed = 2;
started = true;
_root.counter.stop();
b = this.getBounds(this);
}
//=======|goomba’s’s movement and collision|=======//
onClipEvent (enterFrame) {
if (started) {
if (this._xscale == 100) {
_root.counter._x -= xspeed;
this._x -= xspeed;
}
if (this._xscale == -100) {
_root.counter._x += xspeed;
this._x += xspeed;
}
}
if (_root.ground.hitTest(_x+x+b.xmin+5, _y+y+b.ymin+5, true)) {
this._xscale = -100;
}
if (_root.ground.hitTest(_x+x+b.xmax-5, _y+y+b.ymin+5, true)) {
this._xscale = 100;
}
if (!_root.ground.hitTest(this._x, this._y+15, true) && !walking) {
fall += 1;
if (fall>5) {
fall = 5;
}
this._y += fall;
}
}

what should i fix to make the goomab die