Country music queen Miranda Lambert‘s husband, Brendan McLoughlin, is proving to be more than a pretty face — he cowrote a song with her.

The former New York City cop, 32, has mostly been seen as arm candy for the 40-year-old “Mama’s Broken Heart” singer since they tied the knot five years ago.

But now he’s showing that he, too, has a creative side by collaborating with his hit-making wife on her new single, “Dammit Randy.” And he could cash in on it big time!

“Brendan’s had ideas for songs before, but Miranda finally invited him in as a full songwriting partner,” an insider exclusively tells In Touch. “If this song makes it to No. 1, as most of Miranda’s songs do, Brendan could pocket $200,000 or more in royalties!”

Sources say Brendan has done numerous unpaid jobs for Miranda, including tapping into his lawman skills to help with security during her concert tours. But he’s apparently looking for more.

“Brendan’s too young to retire and just live off Miranda’s bucks,” shares the insider. “He wants a career, too!”

And “Dammit Randy” could be his ticket to jump on Miranda’s songwriting gravy train. She debuted the tune about heartbreak at a June 29 concert in Midland, Texas, and had the crowd shouting “Dammit Randy!” along with her.

Have a tip? Send it to us! Email In Touch at contact@intouchweekly.com.