If you're trying to protect against spam-bots, robots.txt isn't going to help you, since most evils will ignore it anyway
To only allow Google (out of all the 'honest' bots), swap the two statements you have, so that you first declare all user-agents disallowed, then overwrite the permissions for Google.