How I created an OS X service to post text to pastebin.com:
I launched Automator and chose the “Service” template for my new workflow. I dragged in a “Run AppleScript” action and pasted in this AppleScript code. I then dragged in a “Copy to Clipboard” action. At the top of the workflow, I had: “Service receives selected text in any application” and had “Replaces selected text” unchecked. I saved the workflow as Pastebin.com.workflow.