Rihanna did her best impression of Rambo Thursday night — when the singer let loose with some FULLY AUTOMATIC MACHINE GUNS … and TMZ has the crazy footage.

RiRi rolled up to the Guns and Ammo Garage in Las Vegas for a midnight session at the gun range — where we’re told she shot a variety of fully automatic weapons, including the SAW machine gun and the M4 and AR-15 rifles.