From the Super Mario Wiki
Retrieved from "https://www.mariowiki.com/index.php?title=Thunder_Shot&oldid=1516659"
Fly Guy starts by dribbling the ball in an S shape. The ball becomes white with electricity. Fly Guy pulls out a spear and starts spinning it, which shocks the ball with electricity. Next, Fly Guy throws the ball (which is completely yellow) into the basket with the spear and if made in, what appears to be a lightning strike hits through the basket.
If shot outside the three-pointer line, A teammate will dunk the electric ball after Fly Guy throws the ball with his spear.