Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import sys
- import os
- import json
- import string
- GamePassID = input('GamePass ID: ')
- IDs = 'Usernames.txt'
- Output = open('ConfirmedOwners.txt', 'a')
- with open(IDs) as fp:
- for cnt, line in enumerate(fp):
- r = requests.get('https://api.roblox.com/users/get-by-username', params={'username':line.strip()})
- user_id = r.json()['Id']
- usrid = str(user_id)
- url = 'https://inventory.roblox.com/v1/users/' + usrid.strip() + '/items/GamePass/' + GamePassID
- r = requests.get(url)
- if "GamePass" in str(r.json()):
- print('User: ' + line.strip() + " | Has The GamePass!!!")
- Output.write('User: ' + line.strip() + ' | Has The GamePass!!!\n')
- durl = "DISCORDWEBHOOKHERE"
- data = {}
- data["content"] = 'User: ' + line.strip() + " | Has The GamePass!!!"
- data["username"] = "Enjoi Deliveries"
- result = requests.post(durl, data=json.dumps(data), headers={"Content-Type": "application/json"})
- try:
- result.raise_for_status()
- except requests.exceptions.HTTPError as err:
- print(err)
- else:
- print("Sent info to discord, code {}.".format(result.status_code))
- else:
- print("User: " + line.strip() + " | Does Not Have The Game Pass :(")
Add Comment
Please, Sign In to add comment