From the Super Mario Wiki
“His Coconut Gun can fire in spurts. If he shoots ya, it's gonna hurt!”
The Coconut Shooter resembles a hollowed-out log with a twig sticking out of it; the twig is possibly the weapon's crosshair. As the name implies, the Coconut Shooter is capable of firing coconuts.
The Coconut Shooter can be purchased by Donkey Kong from Funky Kong for three Banana Coins at Funky's Store in Jungle Japes, the first world of Donkey Kong 64. With the Coconut Shooter, Donkey can shoot Banana Balloons, hit Coconut Switches and snipe enemies from afar.
Further into Donkey Kong 64, special upgrades to the Coconut Shooter (as well as other weapons) can be purchased at Funky's Armory. Some of these upgrades include a larger ammo capacity, a sniper scope, and enemy-seeking ammo.
Pre-release screenshots of Donkey Kong 64 show that the Coconut Shooter was originally going to be a weapon similar to a double-barrel shotgun.
Names in other languages