Formal:
* Merci pour tout le plaisir. (This is the most direct translation and is appropriate for a formal setting.)
* Je vous remercie pour tous ces moments agréables. (This is a slightly more elaborate way of saying it and also suitable for formal situations.)
Informal:
* Merci pour le fun ! (This is a very casual way to say it and is suitable for friends or family.)
* Merci pour tout le plaisir qu'on a eu. (This is a more polite way to say it, but still informal.)
* Merci pour tout le bon temps qu'on a passé. (This means "Thank you for all the good time we spent" and is also appropriate for informal situations.)
You can also use the phrase "Merci pour tous les bons moments," which means "Thank you for all the good moments." This is a very versatile phrase and can be used in both formal and informal situations.
Ultimately, the best way to say "Thank you for all the fun" in French depends on the specific context and your relationship with the person you are speaking to.