I gave a game where you access the Inventory by looking straight down.

Here is the script

public Transform Cam;
public GameObject Pistol;

void Update ()
{
	if (Cam.rotation.x == -90f){
		Debug.Log("Inventory");
	}
}

It’s short I know.

Assuming I am understanding your confusion, and this is simply not behaving the way you want it to, I believe I know your issue. I imagine -90 is supposed to be the camera angle on the x axis, correct? The problem is that Cam.rotation is actually the cameras rotation in the form of a quaternion which doesn’t appear to be what you want. Since -90 is in degrees, we need to find some way to convert that quaternion into a degree representation that is more understandable to us. Try this:

// Rotation in quaternions
// Cam.rotation.x

// Rotation in degrees
// Cam.eulerAngles.x

if (Cam.eulerAngles.x == -90f) {
    Debug.Log("Inventory");
}

And you may actually want to use 90 instead of -90, but that depends on your projects orientation. If something isn’t quite giving you the behavior that you expect, try printing it! It almost always helps. If you printed out what Cam.rotation.x was, you could see that it gets nowhere near 90 (or -90) because it is a quaternion instead.