Why does my engine say " it needs to derive from MonoBehaviour" whenever I try to add script?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour {

public int RotateSpeed;
public AudioSource CollectSound;
public GameObject TheGem;

void Update() {
    transform.Rotate(0, RotateSpeed, 0, Space.World);
}

//void OnTriggerEnter(Collider other)
//{
    //CollectSound.Play();
    //TheGem.SetActive(false);
//}

}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerCasting : MonoBehaviour {

public static float DistanceFromTarget;
public float ToTarget;

void Update () {
    RaycastHit Hit;
    if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out Hit))
    {
        ToTarget = Hit.distance;
        DistanceFromTarget = ToTarget;
    }
}

}using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CollectGem.cs : MonoBehaviour {

public float TheDistance;
public GameObject ActionDisplay;
public GameObject ActionText;
public GameObject ExtraCurser;
public GameObject TheGem;
public AudioSource CollectSound;

public CollectGem.cs()
{
}

void Update () {
    TheDistance = PlayerCasting.DistanceFromTarget;
}

void OnMouseOver()
{
   if(TheDistance <= 3)
    {
        ActionDisplay.SetActive(true);
        ActionText.SetActive(true);
        ExtraCurser.SetActive(true);
    } 
   else
    {
        ActionDisplay.SetActive(false)
        ActionText.SetActive(false)
        ExtraCurser.SetActive(false)
    }

   if(Input.GetButtonDown("Action"))
    {
        if(TheDistance <= 3)
        {
            CollectSound.Play;
            ActionDisplay.SetActive(false);
            ActionText.SetActive(false);
            ExtraCurser.SetActive(false)
        }
    }
}

 void OnMouseExit()
{
    ActionDisplay.SetActive(false);
    ActionText.SetActive(false);
    ExtraCurser.SetActive(false)
}

}
Whenever I try to add these scripts it ALWAYS SAYS "The script needs to derive from MonoBehaviour!! It is SO annoying considering the fact that I added MonoBehaviour in my script! I don’t know what to do it and it is driving my crazy considering I can’t even play my game without it showing up. I actually added it in before without any problem but all of a sudden it starts popping up!

What version of unity are you running? Also please properly input your code. It’s a mess and only some of it is actually displaying properly.

@GameDev26

You need to change the name of the class CollectGem.cs to CollectGem