A detachable driving assembly for a toy gun has a first casing containing
a piston device and a second casing containing a gear set. The first
casing and the second casing are detachably combined by a pin and a
levering lock. The piston device has a piston body with a spring and a
toothed rack formed under the piston body. The gear set mainly comprises
a miter gear, a reduction gear and a half-toothed gear sequentially
rotated by a motor to drive the piston device. The half-toothed gear has
a periphery, multiple teeth partially formed on the periphery, and an
idle area formed on a remainder of the periphery. Thereby, when the teeth
engage with the toothed rack to run with the half-toothed gear, the
piston device is driven to a compressed condition. When the half-toothed
gear enters the idle area, the piston device is released to punch a
projectile.