This is often associated with a wasps nest. The heat from the nest creates a water stain on the ceiling plaster and the ticking/scraping noise is caused by wasps eating the plaster board away. Do not delay in calling us, if left the nest could break through the ceiling and the weight of the nest has been known to collapse through it completely.
This can often be confirmed by looking on the outside wall of the house corresponding to near to where the stain is. Wasps will probably be flying in and out of the wall by the guttering or a gap in the wall.