Joy Boy was a man from the surface world who played an important role in the history of Fish-Man Island. At some point, he came across an island, which would later be named Laugh Tale by Gol D. Roger, and left behind a treasure.
It has been implied that Joy Boy was an extremely relevant figure of the Void Century, with Gol D. Roger declaring that he wished the two could have lived during the same period upon learning the true history on Laugh Tale.
So it stands to reason that the Great Kingdom, Joy Boy, the Ancient Weapons and the Will of D. are all connected, in fact that’s pretty much confirmed in Chapter 967.
It is assumed by many fans that Joy Boy was a very important person in the Great Kingdom, perhaps even its king.
The Clan of D. was a very important clan in that Ancient Kingdom (possibly its rulers) and the Ancient Weapons were created by, or at the very least were in posession, of said kingdom.
It’s very likely that Joy Boy is the person who did wear the massive straw hat kept inside the vault in Mary Geoise.
A very popular theory is that the Ancient Kingdom had plans on destroying the Red Line, thus promoting the unity of the world in “One Piece”. That of course ties back to the fall of Mary Geoise and the prophecy of the destruction of the Fishman Island aswell as the “promised day”, on which the merfolk will live on the surface, under the sun together with the humans and all other races.
Chapter 967 has confirmed what most fans have already pretty much known: that the One Piece was already there when Roger got to Laugh Tale. Therefore it was left there by Joy Boy and the Ancient Kingdom (It’s still possible that Roger had included something on the treasure, though).
For the One Piece to “function” or to work properly, it is believed that the three Ancient Weapons are needed. That’s most definitely one of the reasons why Roger couldn’t fulfill the will of that Ancient Kingdom, for he didn’t have enough time. After all, Shirahoshi would not be even born in around 10 years.