You can accomplish this in a number of ways. Here's one way

Points for playing: "if(r == 9, 30, if(r == 8, 50, if(r == 7, 70, if(r == 6, 90, if(r == 5, 120, if(r == 4, 170, if(r == 3, 250, if(r == 2, 400, if(r == 1, 500, 0))))))))) + 10"

Points for hit: 10