If you really want to get the state of several modifiers with a single call you may use:
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit" -- for NSEvent
delay 3
set {optionState, controlState, commandState, shiftState} to my checkModifier:{"shift", "command"}
display dialog "optionState = " & optionState & linefeed & "controlState = " & controlState & linefeed & "commandState = " & commandState & linefeed & "shiftState = " & shiftState
on checkModifier:keyList
set theResults to {false, false, false, false}
set theFlag to current application's NSEvent's modifierFlags() as integer
if keyList contains "option" then
set theMask to current application's NSAlternateKeyMask as integer
if ((theFlag div theMask) mod 2) = 0 then
false
else
true
end if
set item 1 of theResults to result
end if
if keyList contains "control" then
set theMask to current application's NSControlKeyMask as integer
if ((theFlag div theMask) mod 2) = 0 then
false
else
true
end if
set item 2 of theResults to result
end if
if keyList contains "command" then
set theMask to current application's NSCommandKeyMask as integer
if ((theFlag div theMask) mod 2) = 0 then
false
else
true
end if
set item 3 of theResults to result
end if
if keyList contains "shift" then
set theMask to current application's NSShiftKeyMask as integer
if ((theFlag div theMask) mod 2) = 0 then
false
else
true
end if
set item 4 of theResults to result
end if
return theResults
end checkModifier: