Like this?
Command: (setvar "GRIPBLOCK" (boole 6 (getvar "GRIPBLOCK") 1))
1
Command: (setvar "GRIPBLOCK" (boole 6 (getvar "GRIPBLOCK") 1))
0
* Edit:
Sorry, i should prolly use the Var. you wanted to use in my example. I fixed my example to use the variable you used in your question.)