How can you do compound boolean statements in AppleScript?
The following should handle the test:

set Variable1 to "5"

if (Variable1 is not "5") and (Variable1 is not "6") then
    display dialog "Variable1 is not 5 or 6"
else
    display dialog "Variable1 is " &amp; Variable1
end if