Is there a function similar to a hash function, but it's reversible?
While not reversible, HMAC seem to be a plausible solution. 

HMAC is a construct that adds a "key" to the hash digest, your program generates it with a symmetric key that's somewhat hidden in your program. You verify the player's scores by hashing the score with the key and compare the digest - this is a very typical tag comparison of message authentication code.