Beat the elite four(and champion)then get at least 60 pokemon,then go to profeesor oak and he will give you a national pokedex,then go to celio at that machine on 1 island then go up to mt ember at the beginning go right,battle team rocket,go in the cave they dug,get the ruby plate,give it to celio,he will give you rainbow pass!