Just log in to the PGL using the game that you used to participate in the Weakness Cup and click here. To redeem the code in your game, select Mystery Gift from the main menu, then select Receive Gift, and then select Get with Code/Password and follow the prompts to enter your special code. Be sure to enter the code in your copy of Pokémon Sun or Pokémon Moon before August 30, 2017, at 23:59 UTC.