Where is the Inventory Slots function?(Code)

I’m currently working on an Inventory and Trading system and I want to connect both with each other(When I trade a tool with someone it should get teleport to the Inventory) and for example when I have a tool on the ground I can equip it by holding e and it gets teleport to the inventory but I don’t really know what the function for that like (InventorySlots,BackPack, Inventory What is the Code!?)I got some Script’s:
Local Script:(As a Picture and as Code)

local InventoryEvent = game.ReplicatedStorage.Remotes.InventoryEvent
local itemFrame = script.Parent:FindFirstChild(“ItemsFrame”)

InventoryEvent.OnClientEvent:Connect(function(ItemName, Value)
if Value == true then

	local ItemButton = script.Parent.ItemsFrame.ItemButton:Clone()
	ItemButton.Visible = true
	ItemButton.Name = ItemName
	ItemButton.Text = ItemName
	ItemButton.Parent = itemFrame
	
	local equipButton = script.Parent.EquipFrame["EquipButton"]
	
		ItemButton.MouseButton1Click:Connect(function()
			script.Parent.EquipFrame.Title.Text = ItemName
			script.Parent.EquipFrame.Title.Visible = true
			equipButton.Visible = true
		end)
end

end)

And I got another normal Script:

local inventoryEvent = game.ReplicatedStorage.Remotes.InventoryEvent

game.Players.PlayerAdded:Connect(function(player)

local inventory = player:WaitForChild("Inventory")

local inventoryFrame = player.PlayerGui:WaitForChild("InventoryGui").InventoryFrame.ItemsFrame:GetChildren()

inventory.ChildAdded:Connect(function(Item)
	inventoryEvent:FireClient(player, Item.Name, true)
end)

end)

inventoryEvent.OnServerEvent:Connect(function(player, ItemName, Value, button)

 if Value == false then
		local SelectedItem = player.Inventory:FindFirstChild(ItemName)
		local backpack = player.Backpack:GetChildren()
		local stuff = player.Character:GetChildren()
		
		if #backpack == 0 and not player.Character:FindFirstChildWhichIsA("Tool") then
			button.Text = "Unequip"
			button.BackgroundColor3 = Color3.new(255,0,0)
			SelectedItem:Clone().Parent = player.Backpack
		else
			for i,v in ipairs(backpack) do
				button.Text = "Equip"
				button.BackgroundColor3 = Color3.new(0,255,0)
				v:Destroy()
			end
			for i, v in ipairs(stuff) do
				if v:IsA("Tool") then
					button.Text = "Equip"
					button.BackgroundColor3 = Color3.new(0,255,0)
					v:Destroy()
				end
			end
		end
 end

end)

I may have one last script(but tell me if u want it)

I want to know the Name of the place the tools get teleport to