Here's How To Get Your Free Celebi In Pokemon Sun And Moon
https://www.gamespot.com/articles/heres-how-to-get-your-free-celebi-in-pokemon-sun-a/1100-6453508/
Pokemon Gold and Silver are now available in the 3DS Eshop, and those who purchase either of the classic titles will receive a free gift: a code for the Mythical Pokemon Celebi, which you can redeem in either Pokemon Sun, Moon, or the upcoming Ultra Sun and Ultra Moon. However, how you get your code may not be readily apparent, so we've outlined the steps you'll need to take to receive your Celebi.
To find your code, launch the 3DS Eshop and select the Settings/Other option from the main menu. From there, choose Account Activity and view your receipt for either Pokemon Gold or Silver, depending on which version you purchased. Your code can be found at the bottom of the receipt. Make a note of the code, then launch either Pokemon Sun or Moon (or Ultra Sun/Ultra Moon, if you choose to wait for those versions to launch) and select the Mystery Gift option. Input your code, and you'll be able to pick your Celebi up from the deliveryman waiting inside any of the games' Pokemon Centers.