Not even going to lie, it looks like you tried putting Javascript into C# files, or the other way around (somehow, just what the errors look like.) Anyway, here’s what you should be doing, in C#
using UnityEngine;
using System.Collections;
public class OnClick : MonoBehavior
{
public bool isClicked = false;
public string name = "Some name";
public void Start()
{
if(gameObject.GetComponent(Collider) == null)
gameObject.AddComponent(typeof(BoxCollider));
}
public void OnMouseDown()
{
isClicked = true;
}
public void OnMouseUp()
{
isClicked = false;
}
public void OnGUI()
{
if(isClicked)
GUI.Label(new Rect(5,5,400,100), "This is " + this.name);
}
}