You can use Unity C# scripts, but not UnityScript which is a modified JavaScript. Just have a look at some of the simpler plugins for a start, it should be rather straight forward if you are familiar with Unity. You plugin needs to derive from MVRScript, which is just a MonoBehaviour with some extras.