What's wrong with my spider plant?

I didn't see any parasites around the plant, except for a few gnats. The little black spots look like fly shit to me. So maybe it's the gnats? What can I do to save the plant? It's doing quite terrible at the moment. Any help would be appreciated.

I didn't see any parasites around the plant, except for a few gnats. The little black spots look like fly shit to me. So maybe it's the gnats? What can I do to save the plant? It's doing quite terrible at the moment. Any help would be appreciated.