how can I get rid of this issue?

Hi guys, I have been trying to bypass this error for at least 8 hours, but no luck…
I started off with this c# script:

Public void Update () {
if (distancetraveled >= 13f){
			Camera.main.transform.position.x = 7.19f;
			Camera.main.transform.position.y = 0f;
			Camera.main.transform.position.z = 0f;
			Camera.main.transform.rotation.x = 0f;
			Camera.main.transform.rotation.y = 270f;
			Camera.main.transform.rotation.z = 0f;
		}
if (distancetraveled < 13f){
			Camera.main.transform.position.x = 0f;
			Camera.main.transform.position.y = 2.74f;
			Camera.main.transform.position.z = -3.5f;
			Camera.main.transform.rotation.x = 12.57002f;
			Camera.main.transform.rotation.y = 0f;
			Camera.main.transform.rotation.z = 0f;
		}
}

}

but unity started trowing errors and after some research I found out that javascript will allow this while c# wont, so I wrote the whole thing in javascript but now Im getting this error: The class defined in the script file named ‘Runnabout’ is not derived from MonoBehaviour or ScriptableObject! Im using this Javascript :

#pragma strict

public class Runnabout extends MonoBehaviour {
var csScript: Runner1 = GetComponent(Runner1);
var distancetraveled = csScript.distanceTraveled;
function Start () {
}

function Update () {
if (distancetraveled >= 13f){
			Camera.main.transform.position.x = 7.19f;
			Camera.main.transform.position.y = 0f;
			Camera.main.transform.position.z = 0f;
			Camera.main.transform.rotation.x = 0f;
			Camera.main.transform.rotation.y = 270f;
			Camera.main.transform.rotation.z = 0f;
		}
if (distancetraveled < 13f){
			Camera.main.transform.position.x = 0f;
			Camera.main.transform.position.y = 2.74f;
			Camera.main.transform.position.z = -3.5f;
			Camera.main.transform.rotation.x = 12.57002f;
			Camera.main.transform.rotation.y = 0f;
			Camera.main.transform.rotation.z = 0f;
		}
}
}

Remove “public class Runnabout extends MonoBehaviour {”, you don’t need that for javascript. It uses the filename as the classname.