So to clarify you want damage to be a random number between 1 and 6 and accuracy a random number between 1 and 5, right? In that case, make the variables %LIFELOSS, %DAMAGE and %ACCURACY.
Link Script
%DAMAGE := 1D6
%ACCURACY := 1D5
%LIFELOSS := %DAMAGE - %ACCURACY
%GOBLIN := %GOBLIN - %LIFELOSS
The first line is saying set (:=) the variable damage (%DAMAGE) to 1D6 (which is basically as if you're rolling 1 dice with 6 sides, you can set this to 2D6 if you want and it'd be like you're rolling two 6-sided die).
The second line is saying set (:=) the variable accuracy (%ACCURACY) to 1D5 (random number between 1 and 5).
Third line is saying that the variable %LIFELOSS will be set to %DAMAGE minus %ACCURACY, which is what you wanted when you said "I want life loss=Damage-accuracy".
I'm assuming you want the goblin to lose this life, so in the fourth line it basically reads "set %GOBLIN to what it currently is, minus what %LIFELOSS is set to".
Of course, you could ignore making the three other variables and just have a way more simple script:
%GOBLIN := %GOBLIN - (1D6 - 1D5)
If you wanted to have text somewhere saying "the goblin lost X life" you'd have to have the %LIFELOSS variable there, and then put (without scripting, just on the page) "the goblin lost %%LIFELOSS%% life" which, if %LIFELOSS was set to 5, would read "the goblin lost 5 life".
Hope this helps, it's a bit confusing as to what you want but yeah. Also - I played your game, I'm not sure if it's intentional or not but when you attack the goblin, the health isn't subtracted from him until you click on the link "goblin". I'm not sure if this is intentional or not, so if it isn't intentional the mistake you've made is putting the life loss link script on the "goblin" link, not on the "slash/stab/chop" link.