In each link of the guessing page set the link script to set %GUESS (a variable) equal to the link number.
Then, ON THE PAGE WHERE THE RESULT IS SHOWN, you set the random variable to a random number, between 1 and 6. Then do a check to see if %RANDOMVARIABLE = %GUESS, and give money accordingly.
%RANDOMVARIABLE := 1D6
IF %RANDOMVARIABLE = %GUESS THEN
%MONEY := %MONEY + 2
ELSE
%MONEY := %MONEY -2
^Script on the ending page. You'd also need scripting to show what the answer was and what they guessed.
You rolled the dice and the result is....%%RANDOMVARIABLE%%
You Guessed %%GUESS%%
^ What you would write on the actual page (not page script) to reveal the result and the guess.
You actually don't even need to use link scripting for this way. You can do variable changes with links without scripting.