During several of the Apollo missions, astronauts carried unusual scientific equipment to the moon - a small grenade launcher with four grenades. It was not intended for military purposes, but for seismic studies of the lunar soil.
The experiment involved the creation of artificial seismic waves through explosions of charges of known strength. Seismometers were installed on the surface of the moon which recorded ground vibrations after explosions. Based on the arrival time of the waves, their speed and the nature of their propagation, scientists could determine the properties of underground rocks and study the internal structure of the moon. In fact, the same principle was applied as in seismic exploration on Earth.
Interestingly, these grenades were never used during the Apollo 14 mission. They stayed on the surface of the moon.