I would create a value Called max = 0, go through all the items in the inventory, if the damage of any item in the inventory is greater than max, then set max equal that item
ex.
local BestItem = nil
local Max = 0
for i,v in pairs(Inventory) do
if v.Damage > Max then
Max = v.Damage
BestItem = v
end
end