The song was written and produced by Max Martin and Rami Yacoub, Alexander Kronlud co-wrote the song; it was also produced by Martin and Yacoub.
The song was written and produced by Max Martin and Rami Yacoub, Alexander Kronlud co-wrote the song. "Lucky" was written by Max Martin, Rami Yacoub and Alexander Kronlud, and was produced by Martin and Yacoub.