Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, re, threading, ctypes, json, time, datetime, os, random
- settings = json.load(open("settings.json", 'r'))
- rn = datetime.datetime.now()
- print("{} | Settings loaded successfully ".format(str(rn.strftime("%H:%M:%S"))))
- session = requests.session()
- session.cookies[".ROBLOSECURITY"] = settings["cookie"]
- rbx = session.get("https://www.roblox.com/mobileapi/userinfo")
- if rbx.status_code == 200:
- print("{} | vSnipe v1.0.0 starting with".format(str(rn.strftime("%H:%M:%S"))), rbx.json()["RobuxBalance"], "Robux")
- else:
- raise ValueError("Invalid cookie.")
- robux = rbx.json()["RobuxBalance"]
- crsf_token = ""
- buys = 0
- def crsf24():
- global crsf_token
- while True:
- crsf_token = re.search(r"<script>Roblox.XsrfToken.setToken\('(.*?)'\);</script>", session.get('https://www.roblox.com/games/?SortFilter=default&TimeFilter=0').text).group(1)
- time.sleep(5)
- attempts = 0
- settings["ids"] = settings["ids"]*15
- def _cthread(id1):
- global attempts
- global buys
- global robux
- asset = id1
- avg_price = int(round(requests.get(f"https://www.roblox.com/asset/{asset}/sales-data").json()["data"]["AveragePrice"] / 2, 0))
- pid = session.get(f"http://api.roblox.com/marketplace/productInfo?assetId={asset}").json()["ProductId"]
- while True:
- try:
- req = session.get(f"https://www.roblox.com/asset/resellers?productId={pid}&startIndex=0&maxRows=3")
- attempts += 1
- if req.status_code == 429:
- time.sleep(5)
- continue
- for i in req.json()["data"]["Resellers"]:
- if i["Price"] <= avg_price and i["Price"] <= robux:
- print(f"{rn.strftime('%H:%M:%S')} | Attempting to buy.")
- a = session.post(f'https://www.roblox.com/api/item.ashx?rqtype=purchase&productID={pid}&expectedCurrency=1&expectedPrice={i["Price"]}&expectedSellerID={i["SellerId"]}&userAssetID={i["UserAssetId"]}', headers={"X-CSRF-TOKEN": crsf_token})
- print(a.text)
- if session.get("https://www.roblox.com/mobileapi/userinfo").json()["RobuxBalance"] != robux:
- buys += 1
- robux -= int(i["Price"])
- except requests.urllib3.exceptions.ConnectTimeoutError as E:
- pass
- ctypes.windll.kernel32.SetConsoleTitleW(f"vSnipe v1.0.0 | Tries: {attempts} | Snipes: {buys} | Robux left: {robux}")
- for _ in range(len(settings["ids"])):
- aid = settings["ids"].pop()
- print("hi!")
- threading.Thread(target=_cthread, args=[aid]).start()
- for e in range(1):
- threading.Thread(target=crsf24).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement