Egg-Gumball Machine Cutscene/Animation

I want to know how I would begin to script and animate a gumball machine so that when you click the purchase sign an ‘egg’ falls out the machine.

How do I go about this?
image