how do i make a simple inventory like in black ops?

I am making a simple inventory that has a max of like 3 things and can change out items for other ones. I need the item you pick up to change with the item you are holding.

heres what i have so far

using UnityEngine;
using System.Collections;

public class MoneyManager : MonoBehaviour 
{
	public int money = 500;

	public GameObject AR15;

	void OnGUI()
	{
		GUI.Label (new Rect (0,0,80,20), money.ToString(), "box");
	}

	void Update()
	{
		Ray ray = Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0));
		RaycastHit hit;

		if(Physics.Raycast(ray, out hit, 3))
		{
			//print("Hit "+hit.collider.name);
		
			if (hit.collider.tag == "Jug")
			{
				print("Hit "+hit.collider.name);
				if(Input.GetKeyDown(KeyCode.E) && money >= 2000)
				{
					money -= 2000;
					hit.collider.gameObject.SendMessage("spawn", SendMessageOptions.DontRequireReceiver);
				}
			}
                 //picking up a gun here
			if (hit.collider.tag == "ar15")
			{
				print("Hit "+hit.collider.name);
				if(Input.GetKeyDown(KeyCode.E) && money >= 1500)
				{
					money -= 1500;
				}
			}
			
		}
	}
}

i sorta got stuck on the inventory thing cant think of how to do it

A very simple way is to have an array of items and then track which one is active.

public GameObject[] items = new GameObject[3];
public int activeItem = 0;

void switchItem(GameObject newItem)
{
  detachActiveItem();
  attachActiveItem(newItem);
}

void detachActiveItem()
{
  //Detach Active Item.
  items[activeItem] = null;
}

void attachActiveItem(GameObject newItem)
{
  items[activeItem] = newItem;
  //Attach New Item
}