Simple Plugin Creation

Hey, I was looking to make a simple road maker plugin. Assuming I have prefabs for the road segments and can script the builder myself, how could I make the script run in edit mode? How do you make a plugin? Apparently you can use C#, can you use JavaScript as well?

Thankyou!

Read the section in the docs about editor scripts: http://unity3d.com/support/documentation/Components/gui-ExtendingEditor.html