This simple joke has stood the test of time to become a classic gag, and can be a great way to give people a little surprise when shaking hands. Hand buzzers are widely available to buy online or from prank shops, and -- after a little winding up and preparation -- will enable you to give a little (non electrical) shock to anybody you shake hands with. Although this might not be a great idea to test when shaking the principle's hand, it can still be a fun joke to play on other friends at the occasion.
If you're required to wear graduation robes, consider wearing an outlandish costume underneath, such as a superhero in spandex). Once you've received your degree, quickly throw off your robe and surprise onlookers. For extra fun, challenge your other friends to dress up under their robes, and see whose costume is most successful when you reveal it.
This takes some preparation, but can be a great way to make people laugh. Before graduation, plan a celebratory dance routine with a few other friends who will also be graduating at the ceremony. This routine should involve lots of physical movement, choreographed dance motions, and should ideally end in a fun pose of smiles and thumbs-up. The routine should be done immediately after the last person in the group has graduated.
Hide several cowboy hats under your robe. When the time comes for everyone to throw their mortarboards in the air, subtly throw the cowboy hats as well. This can create a comic effect when people reach to catch the falling hats, as some graduates will inevitably catch the cowboy hats instead and wonder where they came from.