I use this script very very Well and Thank's Fully

But this code broke After Xmas update

what should i fix this code?

Thx to reading have nice mate pals

Code:
function giveitem(item, times, global_value)
    local types = {"weapon_mods", "masks", "materials", "textures", "colors"}
    if not times then times = 5 end
    for t = 1, #types do
        local type = types[t]
		    for mat_id,_ in pairs(tweak_data.blackmarket[type]) do
		        if mat_id == item then
		            if not global_value then
		                local global_value = "normal"
		                if _.global_value then
					              global_value = _.global_value
			              elseif _.infamous then
					              global_value = "infamous"
			              elseif _.dlcs or _.dlc then
			                  local dlcs = _.dlcs or {}
			                  if _.dlc then table.insert( dlcs, _.dlc ) end
			                  global_value = dlcs[ math.random( #dlcs ) ]
			              end
			          end
			          for i=1, times do managers.blackmarket:add_to_inventory(global_value, type, mat_id, false) end
			          return
			      end
			  end
    end
end

function clearnewitems( type )
    local types = {"weapon_mods", "masks", "materials", "textures", "colors", "armors"}
    if type == "all" then
      for i = 1, #types do clearnewitems(types[i]) end
      return
    elseif not in_table(types, type) then return end
		for mat_id,_ in pairs(tweak_data.blackmarket[type]) do
		    local global_value = { "normal" }
		    if _.global_value then
					  global_value = { _.global_value }
			  elseif _.infamous then
					  global_value = { "infamous" }
			  elseif _.dlcs or _.dlc then
			      local dlcs = _.dlcs or {}
			      if _.dlc then table.insert( dlcs, _.dlc ) end
			      global_value = dlcs
			  end
			  for i = 1, #global_value do
			      if managers.blackmarket:got_new_drop( global_value[i], type, mat_id ) then
                managers.blackmarket:remove_new_drop( global_value[i], type, mat_id )
            end
			  end
    end
end

--------------------------------------------------------------
if managers and managers.menu_component then
  managers.menu_component:post_event("menu_enter")
end
--------------------------------------------------------------
removeitems( "all" )
giveitems("material", 3)