How can I completely stop a script?

Hello, I need some help here, I’m trying to stop this script after the player has clicked on the “Steam_valve”, so that clicking on the “Steam_valve” again won’t do anything. Can someone help?

function OnMouseOver()
      var hit : RaycastHit;
      var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
      if (Physics.Raycast (ray, hit, 2.0))


Just use Destroy() method to remove that script component after it has been used.