History of the repeating rifle:
The first effective breech-loading and repeating
flintlock firearms were developed in the early 1600s. One early magazine repeater has been attributed to Michele Lorenzoni, a Florentine gunmaker. In the same period, the faster and safer Kalthoff system—designed by a family of German gunmakers—introduced a ball magazine located under the barrel and a powder magazine in the butt. By the 18th century the Cookson repeating rifle was in use in
North America, having separate tubular magazines in the stock for balls and powder and a lever-activated breech mechanism that selected and loaded a ball and a charge, also priming the flash pan and setting the
gun on half cock.
https://www.britannica.com/technology/repeating-rifle