basically is this
--table structure:
--[ItemToUpgradeId] = {result = NewItemId, chance = chance to sucess}
local itensUpgrade = {
[38929] = {result = 38928, chance = 100},
[25920] = {result = 25921, chance = 40},
[25921] = {result = 25922, chance = 20}
}
--put a index and a tile...