The song samples "Bye Bye" by Chimbala featuring Liro Shaq and Mozart La Para and "I Don't Believe You Want to Get Up and Dance (Oops!)" by The Gap Band. It was written by Mars, Ronson, Jeff Bhasker, Philip Lawrence, Devon Gallaspy, Lonnie Simmons, Rudolph Taylor, and Robert, Ronnie, and Charlie Wilson. Mars, Ronson, and Bhasker produced the song.