Box Code Below

Create a new Event Sheet for the Box

Hitting box from below

Code Explanation

When the player collides with the box

AND the player is NOT on the floor

AND the player does NOT have a wall to their LEFT

AND the player does not have a wall to their RIGHT

Move the Player DOWN after colliding with the box

Play the HIT animaton of the box

Subtract 1 from the durability of the box

(This determines how many hits before the  box breaks)

Spawn fruit from the box

Set the Fruits Physics Property to moveable

Apply a Physics force to the fruits to send them in random directions.

NOTE:

The code checking if there is a wall to the left or the right is OPTIONAL.

This is a design decision.