**TL;DR - I need a placing system like Mario Party’s**

Hello, I’ve been trying for a while to get this to work right, but now I’m stumped. I’m terrible when it comes to things like this. I’ll try to explain as clearly as possible for little confusion:

For each player there are two values, amount of stars and amount of coins. Places are assigned to each player based upon these values. Stars have priority over coins. And if two or more players have the same amount of coins or stars their places should be the same also.

**Ex.** Player1 has 5 coins and 2 stars, Player2 has 12 coins and 0 stars, Player3 has 12 coins and 0 stars, Player4 has 18 coins and 2 stars. Player4 is first, Player1 is second, Player 2 and 3 are both third, and there is no fourth place.

I can’t figure out how to set up a system for determining the placing. I have all the values I need, but I don’t know how to set it up. If you’re confused the only thing I can think of like this is how the placing works in Mario Party. Can you guys think of any way to do this?