Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. var PageOn = 1
  2. var PageLimit = 20
  3. var RobuxLimit = 50
  4.  
  5. function Go(){
  6. var BaseLink = "http://www.roblox.com/catalog/json?CatalogContext=1&Subcategory=2&Keyword=&CurrencyType=0&pxMin=0&pxMax=0&SortType=2&SortAggregation=0&LegendExpanded=true&Category=2&pageNumber="
  7. $.get(BaseLink + PageOn,function(Data){
  8. for (var Object in Data){
  9. function Loop(){
  10. var Info = Data[Object]
  11. var Id = Info["AssetId"]
  12. var Price = Info["BestPrice"]
  13. var Name = Info["Name"]
  14.  
  15. if (RobuxLimit >= Price && Price) {
  16. function check(Id, price) {
  17. $.get("http://www.roblox.com/Item-item?id=" + Id).done(function(Data){
  18. var info = $($("<div>").html(Data.replace(/img/gi,"flip")).find('.ItemSalesTable tr')[0]).find('.PurchaseButton').data();
  19. var d = $($("<div>").html(Data.replace(/img/gi,"flip")).find('.ItemSalesTable tr')[1]).find('.PurchaseButton').data();
  20. if (info['expectedPrice'] <= Price) {
  21. var buy = "http://www.roblox.com/API/Item.ashx?rqtype=purchase&productID=" + info["productId"] + "&expectedCurrency=1&expectedPrice=" + info["expectedPrice"] + "&expectedSellerId=" + info["expectedSellerId"] + "&userAssetID=" + info["userassetId"];
  22. $.ajax({
  23. url: buy,
  24. type: "POST"
  25. });
  26. console.log("Bought " + info["itemName"] + " for " + info["expectedPrice"]);
  27. } else {
  28. console.log('Missed '+info['itemName']+'for '+price);
  29. }
  30. })
  31. }
  32. check(Id, Price)
  33. }
  34. }
  35. Loop()
  36. }
  37. }).always(function(){
  38. PageOn++
  39. if (PageOn == PageLimit){
  40. PageOn = 0
  41. }
  42. Go()
  43. })
  44. }
  45. Go()
  46. console.log("Snipe bot started!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement