Hi searching for an script which allows other users to change my name and i say something back and change my nick back to original

For example

Someone types bleep in the chat

My name changes to RD2D
I say bleep back
My name changes back to Original

Is this possible to make? If so, how?