Professor jupiner gives it to you after you defeat the elite four or before can't remember but you will find a thundorus (legendery) but you din't battle it straight away. you have to find thundorus in the wild hope it helps