AppleScript error with if statement I have a long script that I use for a while but just realise that I have an error.

The first parameter of the if statement don't seems to be taken in consideration 

set GUID to "demo"
set FoundGUID to "Not good"
set trustitemOnMyList to "TRUST"
set trustitemOnMyList to "2step"

if GUID is equal to FoundGUID and trustitemOnMyList is equal to "TRUST" or trustitemOnMyList is equal to "2step" then
    display notification "True"
end if


In this case GUID and FoundGUID is not equal but the script seems to ignore this.

PS: to make it more clear, to be valid, I need the GUID to be the same than FoundGUID, and I need trustitemOnMyList to be either equal to "TRUST" or to "2step"
Unless indicated otherwise, the comparisons are performed in order from left to right, so you just need to group them, e.g. x and (y or z) instead of x and y or z, otherwise that last or can decide:

if GUID is equal to FoundGUID and (trustitemOnMyList is equal to "TRUST" or trustitemOnMyList is equal to "2step")
    -- or --
if GUID = FoundGUID and trustitemOnMyList is in {"TRUST", "2step"}