The overarching goal of this project is to examine the effect of combining theta burst stimulation (TBS) with or without N-acetylcysteine (NAC) on cocaine craving and brain response to cocaine images. Participants (N=144) will undergo a baseline MRI visit to assess craving and brain function, and then be randomized to one of four conditions: 1) NAC + Active TBS, 2) NAC + Sham TBS, 3) Placebo + Active TBS, 4) Placebo + Sham TBS. In addition, a subset of individuals will be assigned to one of two groups that will not receive any study medication but will be randomly assigned to receive either: Active TBS alone or Sham TBS alone. Following 3-days of study medication (NAC or Placebo), or within at least 24 hours for the no study medication groups, participants will return for a second MRI visit wherein brain function and cravings will be assessed immediately before and after active TBS or SHAM TBS. Participants will be contacted via phone over the following 3-weeks to assess mood and craving.