Hello i'd like to share my script.
Its item sorter, it works smoothly.
Here you are. 
lua code:
--[[
Config
]]--
local itemSort = 3031 -- itemID or itemName to sort.
local backpackSortFrom = 'demon backpack' -- backpack ID or Name where item you want to sort is.
local backpackSortTo = 'golden backpack' -- backpack ID or Name where you want to sort item.
local dLay = 5000 -- Delay beetwen sorting. make it 0 if you want just to sort your items, and make like 5000 if u use it while exp.
--[[
itemSorter
]]--
-- Don't change code below.
local itemSorter = function(sortItem, from, to)
local fromBp = Container.New(from)
local toBp = Container.New(to)
if type(sortItem) == 'number' then
for spot, item in (fromBp:iItems()) do
if item.id == sortItem then
fromBp:MoveItemToContainer(spot, toBp:Index())
end
end
elseif type(sortItem) == 'string' then
for spot, item in (fromBp:iItems()) do
if item.name == sortItem then
fromBp:MoveItemToContainer(spot, toBp:Index())
end
end
end
end
Module.New('Sorter', function(this)
itemSorter(itemSort, backpackSortFrom, backpackSortTo)
this:Delay(dLay)
end)