You can't type it by default because it's the console key, if it wasn't filtered by chat people who knew how to insert it would lord it over others.
If you insert "\x7E" in a string in script, that's the tilde. So you could do commandtoserver('messagesent',"I\'m a huge fat gay\x7E"); in the console and it will send. But the default servercmdmessagesent filters the character out. Most chatmods don't, so if the server has a custom chat you're probably good to go.