Machine Gun Kelly credited his girlfriend Megan Fox for making him a “better person.”

The couple has been romantically linked since May after meeting on the set of “Midnight in the Switchgrass.

Kelly, whose real name is Colson Baker, said in a new interview that Fox, 34, changed the direction of his album “Tickets to my Downfall” and inspired him to change.

The rapper, 30, told NME that he was “coked out of my mind in a drunken stupor” before he started dating the “Transformers” star.

MEGAN FOX HAS INTRODUCED HER KIDS TO MACHINE GUN KELLY: REPORT

“‘Tickets’ is essentially my diary,” he told the outlet, “because I did fall in love during the making of this record, and I did become a better person.”

Machine Gun Kelly says Megan Fox made him become a "better person."

Machine Gun Kelly says Megan Fox made him become a "better person." (Getty)

The “Bloody Valentine” singer continued: “It’s interesting. There was probably a crossroads in the middle of making this album where the title would have lived up to the reality.”

“I think the universe caught on to me wanting to make a change. It was like: ‘Maybe we won’t make this a reality; maybe we’ll make this ironic.’ Instead of the downfall, go ahead and have the biggest rise of your f**king life,” Kelly added.

MACHINE GUN KELLY REVEALS MEGAN FOX IS THE FIRST PERSON HE'S FALLEN IN LOVE WITH

He continued: “You know what’s so beautiful, bro? Love is the one thing that can’t be restricted. No one has the power to stop that, as much as so many have tried in my life thus far.”

Kelly has previously revealed his relationship with Fox is the first time he’s fallen in love.

CLICK HERE TO GET THE FOX NEWS APP

Their romance has also reportedly reached new heights with the rapper meeting Fox’s three children -- Noah, 8, Bodhi, 6, and Journey, 4 -- who she shares with her estranged husband Brian Austin Green, according to People.