Why Pakistani flag have moon and star sign?

Pakistan is an Islamic country and so its flag is what is called an Islamic flag. Tradition has it that Sultan Osman I had a dream involving a giant crescent moon and from then on the crescent became a Muslim symbol while the five pointed star represents the five pillars of Islam.