How to best calculate the best possible path with weights
Build the metagraph of strongly connected components.  Then execute your idea on the metagraph.  Note that once you enter a strongly connected component through any in-edge, you can collect all coins within it and leave through any out-edge out of that component.