Are lootboxes haram?

Selam Aleykum,

I would like to know if lootboxes are haram? Lootboxes are in some video games and you can purchase them with money. You can get items which are very valuable but you can also get items with low value. Some people say it is haram because it is based on luck but I heard people who said it is allowed because you will get something. It is not like lottery where you lose all of your money or you can win a lot of money.