Disclosed is a device for producing a rotary motion of a shaft. The device includes a support frame, a shaft, a plurality of discs, a plurality of levers, a plurality of SMA wires, a plurality of magnet blocks, a repelling magnet, a container adapted to store a fluid, and a heating mechanism adapted to heat the fluid. The heating of the fluid allows at least one SMA wire contacting the fluid to contract. The contraction of the SMA wire maneuvers a corresponding lever connected with the SMA wire. The maneuvered corresponding lever moves a corresponding magnet block towards the repelling magnet. The repelling magnet repels the magnet block for allowing a driving disc of the plurality of discs to achieve a rotary motion. The subsequent contact of the plurality of SMA wires with the fluid causes the driving disc to rotate continuously, thereby producing continuous rotary motion of the shaft.