Disable Script

I have a inventory script. When i press B it pauses time “So i cant move” now on my main camera there is a Mouse Look script. How can i disable the script.

function Update(){
	
	if ((Input.GetKeyDown (inventory.inventoryKey))&&(showSplitDiag==false)&&(shopScript.toogleShop==false)){
		if(toogleInv == false){
			toogleInv = true;
			Screen.lockCursor = false;
			Time.timeScale = 0;
		}else{
			selectedItem = false;
			toogleInv = false;
		}
	}

This Script is actually attached to the main Camera so i think that would make it easier. Please reply in JS since i do not use/know C# at all.

You set the script enable to false.
Something like this:

YourScriptToDisable currentScript = GetComponent(YourScriptToDisable);
if(currentScript != null)
{
  currentScript.enabled = false;
}

When you want to re-enable it, you just set it to true again:

YourScriptToEnable currentScript = GetComponent(YourScriptToEnable);
if(currentScript != null)
{
  currentScript.enabled = true;
}

Worth to mention: YourScriptToDisable/YourScriptToEnable, is the name of the script that you have.
If you look in the MonoBehaviour documentation, you will also find functions and other things that might come in handy.

Enable documentation

MonoBehaviour documentation

Good luck!