Theres a really easy way to get a Star Piece everyday. A Star Piece sells for 4900 making this an easy way to get money. Right before you go inside Pinwheel forest you should see a non paved path with a nurse in front of it. Follow that path to a set of stairs and head up them. At the top theres a bunch of small rocks and one big one, which is called the challenge rock. Go up the the large rock with a fighting type Pokemon in your party. If you don't have a fighting type you can always catch on in the grass. Anyway go click on the rock and let your Pokemon try to break the it. When this happens your Pokemon will break off a Star Piece. Now you can either go sell your Star Piece or save it for a rainy day.
Credit to super cheats