It’s probably done with API calls and stuff. (It’s the way that I think it’s done. It’s 100% made differently, but you could still make it work like this.)
I think it’s done like this:
Step 1: Make an account with robux.
Step 2: Make an API call to a server.
First you will make a server that can handle API requests.
Then from the website send an API call to your API with the code, if the code is valid, then it we will continue to step 3.
Step 3: Send a HTTP Request(like HTTP Service) to look through all your gamepasses, if it finds a gamepass with a good price to pay, then it will send another HTTP request to buy the gamepass.
Now to find the URL to buy a gamepass, you should first see how the URL looks like when you pay it yourself. On a web browser go to one of your games and make a 1 robuc gamepass(on the bot’s account, if it is your main account then you will be paying with your main account.), then delete the gamepass from your inventory. Right click somewhere and press Inspect. Now go to the Networking tab. Buy the gamepass and look for a HTTP request that made the request to buy it.
Now copy the URL and copy some headers and an API Key(if there is one, I haven’t tested this myself. There will probably be one, the API key is like the password to the API calls from your account.) Now you have the URL!! Change the URL in your code to match with the gamepass you are going to buy. Host your server on a hosting site or a Raspberry Pi.
The reason we need a server is because if you were to handle it all on the website, then people will be able to see the URL of YOUR HTTP request, this is bad because now they can buy anything with your account.
Hope this helped, it may be a little confusing but hey, you still have Google to search anything up.
If anyone does know much of this and can correct me, go ahead! I’m still learning and may have switched the word HTTP request and API call at the wrong time. Thanks for reading!