In Lua it's pretty simple -- just the 'not' keyword.
if not btn(n) then --True if btn n is NOT pressed end