There are many slap back scripts available and you probably can find them easily with Google. But here's just a basic example of one.
on *:text:*:#: {
if (*slaps $me $+ * iswm $1-) {
describe $chan slaps $nick back.
if ($me isop $chan) { kick $chan $nick }
}
}
Be aware that any kind of response script like this can result in both you and the other person getting flooded off the network if both of you have a similar response script. The kick may help, but not necessarily. These kinds of scripts are often more trouble than the "fun" aspect that so many people associate with them.