How can I remove an item ffrom a list.

I know that I can remove it with listName.Remove(blah blah) and that would work fine, but I want to remove an item from the button I am holding it in. I have items in a chest and when you click them they go into your inventory, but they also stay in the chest.
My problem is that when you click a button to remove that item it just removes the last one in the list and not the one that you click on. Does anybody know the solution to this? If you need to see the script I can post it ,but otherwise please help me find a solution.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class OpenCrateScript : MonoBehaviour 
{	
	static public bool lootCrateOpen = false;	//If the loot crate is open or not	
	private float maxDistance;					//Max distance the player can be from the chest to open it.
	public Transform player;					//The player opening the chest
	public GameObject crate;					//The crate that we want to delete or spawn at certain times.

	public Texture2D CrateWindow;
	public Texture2D CloseButton;
	public GUIStyle CrateSlotStyle;
	public GUIStyle CrateButtons;
	public GUIStyle CrateScrollBar;
	public GUIStyle Text;
	public GUIStyle Empty1;
	
	public static List<Item> lootItems;
	private int buttonWidth = 66;
	private int buttonHeight = 66;
	private int offsetX = 217;
	private int offsetY = 62;
	private int maxCols = 3;

	//LOOT WINDOW SCROLL VIEW
	private Vector2 crateWindowScrollView= Vector2.zero;
	void Start () 
	{
		maxDistance = 2.5f;
		lootItems = new List<Item> ();
		PopulateCrate ();
	}
	void Update ()
	{
		if (craftingMenu.craftingMenuOn == true || BuildingMenu.buildingMenuOn == true) 
		{
			lootCrateOpen = false;
		}
		if (Input.GetKeyUp(KeyCode.E) && lootCrateOpen == false) {
			RaycastHit hit;
			if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit)) {
				if (hit.collider.CompareTag("Loot Crate") && Vector3.Distance(hit.collider.transform.position, player.transform.position) <= maxDistance) {
					lootCrateOpen = true;
					inventorySystem.inventoryOn = true;
					inventorySystem.toolbarOn = true;
				}
			}
			if ( lootCrateOpen == true && Input.GetKeyUp(KeyCode.Tab))
			{
				inventorySystem.inventoryOn = false;
				inventorySystem.toolbarOn = false;
				lootCrateOpen = false;
			}
		}
		if (inventorySystem.inventoryOn == true && Input.GetKeyUp (KeyCode.Tab)) 
		{
			lootCrateOpen = false;
		}

	}
	void OnGUI()
	{
		if (lootCrateOpen == true) 
		{
			GUI.BeginGroup(new Rect(701,31,690,800), CrateWindow);
				inventorySystem.inventoryOn = true;
				inventorySystem.toolbarOn = true;
				GUI.Label(new Rect(220,25,100,20),"Small Crate",Text);
					if(GUI.Button(new Rect(430,25,15,15),CloseButton,Text))
					{
						lootCrateOpen = false;
						inventorySystem.inventoryOn = false;
						inventorySystem.toolbarOn = false;
					}
				crateWindowScrollView = GUI.BeginScrollView(new Rect(-5,55,450,285), crateWindowScrollView,new Rect(-15,0,42,700));
					for(int cnt = 0; cnt < 18; cnt++){
						if(cnt < lootItems.Count)
							{
								if(GUI.Button (new Rect((cnt % maxCols)* buttonWidth + offsetX,cnt / maxCols * buttonHeight + offsetY,buttonWidth,buttonHeight),cnt.ToString (),CrateSlotStyle))
									{
										AddItem(cnt);
									}
							}
						else
							{
								GUI.Label (new Rect((cnt % maxCols)* buttonWidth + offsetX,cnt / maxCols * buttonHeight + offsetY,buttonWidth,buttonHeight),string.Empty,CrateSlotStyle);
							}
					}
					GUI.EndScrollView();

			GUI.EndGroup();
		}
	}
	private void PopulateCrate()
	{
		for (int cnt = 0; cnt < 5; cnt++) 
		{
			lootItems.Add (new Item());
		}
	}
	private void AddItem(int cnt)
	{
		inventorySystem.inventory.Add (lootItems [cnt]);
		lootItems.RemoveAt (cnt);
	}
}

The code seemingly correct, and deleting comes from itemloot truly. But the output to the screen, that that remained, in my opinion, incorrectly. After all you have a cycle from 0 to 17. You define that thus there can be a cell as loot from the list (button), or it isn’t present (label). When you delete any cell from the list, the quantity of its elements decreases on 1. But the output to the screen will be as though you deleted the last element. You look, you have initially 17 elements and all of them on the screen as buttons. You delete any of them, then you still have 16 elements, but the cycle goes again from 0 to 17 therefore from your code only the last element will be as label. That to correct it, you need to explain to the system, what element was remote, for example:

 for(int cnt = 0; cnt < 18; cnt++) {
  if(cnt < lootItems.Count) {
   if (lootItems[cnt] != null) { // my explain for system of loot
    if(GUI.Button (new Rect((cnt % maxCols)* buttonWidth + offsetX,cnt / maxCols * buttonHeight + offsetY,buttonWidth,buttonHeight),cnt.ToString (),CrateSlotStyle)) {
     AddItem(cnt);
    }
   } else {
    GUI.Label (new Rect((cnt % maxCols)* buttonWidth + offsetX,cnt / maxCols * buttonHeight + offsetY,buttonWidth,buttonHeight),string.Empty,CrateSlotStyle);
   }
  }
 }

And your AddItem() function:

 private void AddItem(int cnt) {
  inventorySystem.inventory.Add (lootItems [cnt]);
  //lootItems.RemoveAt (cnt);
  lootItems[cnt] = null;
 }

I hope it to you will help.