Not sure if I’m understanding your post, but checked and unchecked boxes must be written as ==1 or ==0
so it would be something like
if (var1==1)
{var2=whatever you want it to do}
else
{var2=the other thing you want it to do}
var2
A slider would be useful if you wanted to apply a linear expression to the result of your boolean operation