It mostly depends on your use case but here's a script that returns 1 if X = Y and 0 otherwise, without using an IF block. You can multiply the output to filter your function to only work for X = Y.