A script/website, integrated with the Steam API:
People deposit items from the game CSGO into a fake player account, the betting "pot".
Once a certain amount of items are deposited, the script chooses a person who deposited items. It's choice depends on chance, and also how much that players deposited items were worth (in USD$). The higher the value of that persons items were, the higher the chance of winning that person has.
The person's winnings are equal to all items deposited by all players. The fake player account (the pot from before that now is holding all deposited items) sends a trade over the Steam Gaming Platform to the winner, with all items included, minus a certain percentage that is reserved to support the website.
https://csgoshuffle.com/ (CSGO SHUFFLE)
https://csgojackpot.com/ (CSGO JACKPOT)
You will need to integrate with the Steam API to retreive player names, items, trades, etc.