My son (10) made a rifle with Lego Technic (mostly set 42097). I like the detail with the little rifle scope in the front. : r/lego
Technic Gun Building Blocks, MBKE 1004pcs 98K Blaster Military Gun Model , Swat Military Weapon Model Building Set Compatible with Lego Technic : Amazon.co.uk: Toys & Games
Tried to recreate the XM-5 (MCX Spear) with Lego technic pieces (and made a curved mag instead of a straight one like the original) : r/legoguns