Writing user scripts requires knowledge of JavaScript. The tutorials on the GreaseSpot Wiki should give you a running start on JavaScript both in general and as it relates to user scripts. Inspecting others' scripts can be helpful. You may be interested in Sleazy Fork's rules for posted scripts and Script meta keys read by Sleazy Fork. If you want help developing your script, feel free to ask in the forum.
To post on Sleazy Fork, you will need to create an account. From your user page, follow the link to post a new script.