A stapling system is disclosed. The stapling system comprises a handle, a shaft extending from the handle, and a disposable loading unit configured for operable attachment to the shaft. The stapling system further comprises a battery, a staple cartridge comprising a plurality of staples removably stored therein, a translatable member configured to translate within the staple cartridge to eject the staples from the staple cartridge, and a rotary drive comprising a motor configured to drive the translatable member, wherein the rotary drive is configured to selectively receive electrical power from the battery only when the disposable loading unit is attached to the shaft.