They're all fighting the Demon King, an entity invoked by Uta who sang the Tot Musica partition. Uta Uta no Mi, Uta's devil fruit, makes fall asleep people who are listening to any Uta's song. Their souls are sent in Uta's world, created by Uta's mind itself. There is no possibility to escape from this world if Uta doesn't sleep, but she ate the "Insomnite", a mushroom which gives insomnia to the consumer, obliging her to die of exhaustion.
But, that Demon King is another passage door to join real world (Robin illustrates it during the movie). People have to defeat him, but it need combined attacks from real and Uta's world.
SO, Yasopp succeeds to interact with Usopp and give instruction to both worlds. Zoro and Beckman's attack is one of the very first during the offensive, Beckman is shooting a very fast bullet, then there's an transition of Zoro running at the same speed as the bullet, and this blow is aiming Demon King's right leg, if my memories are good.
As I said before, Kobi just make a temporary covenant and participates to the final attack.
You might have understand, but Shanks and Luffy's attack is also related to the Demon King. It's the ultimate blow at the center of the monster. Luffy firstly uses Gear 4, but it fastly transformed into Gear 5 appearance. Shanks unsheathed his saber and filled it with Haki. The whole scene is in white color (even characters), but Luffy's fist is red and Shanks's saber blue. They're forming something like a giant phenix-lion.