of     1   

bloccoThe2nd
#16207328Tuesday, November 03, 2009 1:22 AM GMT

function AND(a, b) return a and b end function NAND(a, b) return not a and not b end function OR(a, b) return a or b end function NOR(a, b) return not a or not b end function XOR(a, b) return a ~= b end function XNOR(a, b) return a == b end print(AND(true, true)) print(NAND(false, false)) print(XOR(true, false)) print(XNOR(false, false)) print(OR(false, true)) print(NOR(false, true))
bloccoThe2nd
#16207498Tuesday, November 03, 2009 1:24 AM GMT

I KNEW no one wanted Logic Gates...
zap999999999
#16207744Tuesday, November 03, 2009 1:28 AM GMT

It's helpful to understand Lua, but not used much in Roblox.
gaius19
#16207920Tuesday, November 03, 2009 1:30 AM GMT

Or with just not & and: function XOR(a, b) return not (not a and not b) and not (a and b) end

    of     1