I have been scripting an inventory script for a very long time and most of it seems hard scripted due to continuous scripts for every item box. I need help getting inspired to have the idea that tables are possible with this much detail ideas.

My inv look: http://tinypic.com/r/3012b9j/9

For example:

Mouse.KeyDown:connect(function(key)
    key = key:lower() 
    if key == "f" then 
	if Mouse.Target:FindFirstChild("Class") then
		if Player:DistanceFromCharacter(Mouse.Target.Position) < StudsAway then
		if Mouse.Target:FindFirstChild("IT") then
			if Mouse.Target.SS.Value == 1 then
			local img = Mouse.Target:FindFirstChild("Dec").Value 
			local nam = Mouse.Target:FindFirstChild("NM").Value
				wait(.00001)
				if s.bot.I1.empty.Value == 0 and s.bot.I1.Visible == true then --where repetition of one class of item starts
					s.bot.I1.Nam.Value = Mouse.Target.NM.Value 
					s.bot.I1.Dec.Value = Mouse.Target.Dec.Value 
					s.bot.I1.empty.Value = 1
					Mouse.Target:Destroy()
				elseif s.bot.I2.empty.Value == 0 and s.bot.I2.Visible == true then
					s.bot.I2.Nam.Value = Mouse.Target.NM.Value 
					s.bot.I2.Dec.Value = Mouse.Target.Dec.Value 
					s.bot.I2.empty.Value = 1
					Mouse.Target:Destroy()
--...THERE IS A LOT MORE FOR EVERY DETAIL

Like after that is not all I have so much more. I have 4 classes probably 5. One is melee, one is weapon, one is tool, one is item, one is secondary. Each item goes in specified item boxes and each takes out a special amount of backpack boxes. Melee takes 3 spaces, weapon takes 5, secondary takes 4. Tool takes one and goes in tool belt boxes. Item goes in backpack boxes. Sometimes primary and melee and secondary automatically go to primary, secondary, and melee slots if open. I feel that if i use tables this is not possible. That so much detail isnt possible. If you can get me to buy in to stop hardscripting and use tables please do. When i scripted right now my script for equip would have a whole rundown list of each slot to check if open and I would have to copy and paste pieces of elseif statements and add one number to each number. Like don't get me started on how long my if statement is for melee checking all three boxes is. Anyways please do help me decide if tables are good to help me do this faster. I just worry about not being able to add any other special detail on the way. I had the idea in my head that the more detail in your script you have the easier and more compatible it will be to new detail.