A lock with a roller deadbolt, comprising: a driving member having a first slot and a transverse slot, the driving member including two channels defined in a distal end thereof, the driving member connected to a first spring, a second spring and at least one positioning rod, the first spring located corresponding to the first slot; a deadbolt including a body, an insertion member, a roller and a slide; the body having a fixing slot to which a distal end of the driving member is connected, the body including a receiving space located opposite to one end of the driving member, the body including at least one fixing hole which communicates with the fixing slot; the insertion member received in the fixing hole and including two connection portions which are respectively inserted into the channels, an accommodating room formed between the two connection portions so as to receive the roller therein, a pin extending through the roller, and two ends of the pin fixed with the two through holes, the insertion member including a guide rod protruding therefrom which is located corresponding to the transverse slot, the second spring biasing an end face of the insertion member that is located opposite to the roller, and the slide being restricted by the positioning rods, the slide including a first guide pin and a guide hole, the first guide pin extends through the first slot, the slide including an inclined surface, the first spring biasing the inclined surface so that the slide is movable along the first slot, the guide hole including an extension slot and an inclined slot, the extension slot located at the top end of the guide hole and located corresponding to the transverse slot, the inclined slot communicates with the extension slot and inclinedly extending toward a direction away from the roller, the slide having a transmission rod extending toward a direction away from the roller, when in a non-transmission position, the slide is biased by the first spring so that the first guide pin is located an inner bottom end of the first slot, the insertion member is biased by the second spring and the roller protrudes beyond the receiving space, when in the transmission position, the transmission rod is pushed so that the slide and the inclined slot move toward the top of the first slot, the guide rod contacts the inclined slot to drive the slide and the roller to move along the transverse slot and toward a direction opposite to the roller, the roller does not protrude beyond the receiving space. a driving member having a first slot and a transverse slot, the driving member including two channels defined in a distal end thereof, the driving member connected to a first spring, a second spring and at least one positioning rod, the first spring located corresponding to the first slot; a deadbolt including a body, an insertion member, a roller and a slide; the body having a fixing slot to which a distal end of the driving member is connected, the body including a receiving space located opposite to one end of the driving member, the body including at least one fixing hole which communicates with the fixing slot; the insertion member received in the fixing hole and including two connection portions which are respectively inserted into the channels, an accommodating room formed between the two connection portions so as to receive the roller therein, a pin extending through the roller, and two ends of the pin fixed with the two through holes, the insertion member including a guide rod protruding therefrom which is located corresponding to the transverse slot, the second spring biasing an end face of the insertion member that is located opposite to the roller, and the slide being restricted by the positioning rods, the slide including a first guide pin and a guide hole, the first guide pin extends through the first slot, the slide including an inclined surface, the first spring biasing the inclined surface so that the slide is movable along the first slot, the guide hole including an extension slot and an inclined slot, the extension slot located at the top end of the guide hole and located corresponding to the transverse slot, the inclined slot communicates with the extension slot and inclinedly extending toward a direction away from the roller, the slide having a transmission rod extending toward a direction away from the roller, when in a non-transmission position, the slide is biased by the first spring so that the first guide pin is located an inner bottom end of the first slot, the insertion member is biased by the second spring and the roller protrudes beyond the receiving space, when in the transmission position, the transmission rod is pushed so that the slide and the inclined slot move toward the top of the first slot, the guide rod contacts the inclined slot to drive the slide and the roller to move along the transverse slot and toward a direction opposite to the roller, the roller does not protrude beyond the receiving space.