In my trips to Japan I found Gacha-Pon dedicated stores. 1st floor being the machines proper and 2nd floor being direct sales with a markup. I'd easily compare them to the toy and sticker dispensers seen at stores and malls. You're going to get something as indicated in the picture. Just not being totally clear which something that is. Commons and rares are a norm, given they can control the quantity of items put into the machines.
Another way, which may possibly work in SL by boxing a box to obscure the actual content, is sealed-box collectables. Where there is a shelf of identical boxes, taped shut, with one of a collection in each box. No script needed. Just buy and take boxes with rando content per an image on the outer box. Open outer box, open inner box, get thing. It would limit quantities depending on the size of land in use. But, it could work.
Sparks a memory of a thing I did while in Japan. I saw a carton of SB collectable Yotsuba Koiwai figures. There were 4 different figures in the collections and 8 boxes in the carton. Assuming they would lazily package them with a whole set per carton, I bought the lot. And, I was right! So, I got 2 each of the whole series and they're scattered all easter-egg like around my house. =^-^=