Meliodas0_0

free item javascript generator

Sep 1st, 2019
38
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Code:
  2. ------------------------------------------------------------------------------------------------------------------------------------------
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows.Forms;
  12.  
  13. namespace Free_Catalog_Items
  14. {
  15. public partial class Form1 : Form
  16. {
  17. public Form1()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private void button1_Click(object sender, EventArgs e)
  23. {
  24.  
  25. string htmlCode = webBrowser1.Document.Body.OuterHtml;
  26. string endIds = "";
  27. foreach (HtmlElement elem in webBrowser1.Document.GetElementsByTagName("li"))
  28. {
  29. if (elem.GetAttribute("className").ToString() == "list-item item-card ng-scope")
  30. {
  31. string itemHtml = elem.OuterHtml;
  32.  
  33. int pFrom = itemHtml.IndexOf("https://www.roblox.com/") + "https://www.roblox.com/".Length;
  34. int pTo = itemHtml.LastIndexOf("ng-click=") - 17;
  35.  
  36. string result = itemHtml.Substring(pFrom, pTo - pFrom);
  37.  
  38.  
  39. endIds = "\"" + result + "\", " + endIds;
  40.  
  41. }
  42. }
  43.  
  44. endIds = "var ids = [" + endIds.Remove(endIds.Length - 2, 2) + "];" + "for (var i=1; i < ids.length; i += 2){function buy(){var id = ids[i]; $.get('https://www.roblox.com/' + id, function(data){var html = $(data);var bestprice = $('#item-container', html).attr('data-expected-price');var sellerid = $('#item-container', html).attr('data-expected-seller-id');var productid = $('#item-container', html).attr('data-product-id');if(bestprice == 0){$.ajax({type: 'POST',url: 'https://www.roblox.com/API/Item.ashx?rqtype=purchase&productID=' + productid + '&expectedCurrency=1&expectedPrice=0' + '&expectedSellerId=' + sellerid});}}).promise().done(buy);}buy();}";
  45.  
  46. Clipboard.SetText(endIds);
  47. }
  48. }
  49. }
  50.  
  51.  
  52. ------------------------------------------------------------------------------------------------------------------------------------------
  53. c# code btw for dummies who would try to use free exploit
  54. its kinda bad so if anyone wants to improve this please do
  55.  
  56. basically just a c# app which generates a javascript script which can be ran in the console and auto-buys all the free items from the catalog page loaded
  57. Code:
  58. ------------------------------------------------------------------------------------------------------------------------------------------
  59. var ids = ["catalog/1796649/", "catalog/1592351/", "catalog/1546452/", "catalog/1468886/", "catalog/1671966/", "catalog/1611822/", "catalog/1254325/", "catalog/1607509/", "catalog/1744006/", "catalog/23939248/", "catalog/1789935/", "bundles/531/", "catalog/1713016/", "catalog/1733318/", "catalog/1639654/", "catalog/144076760/", "catalog/1386047/", "catalog/1562150/", "bundles/528/", "catalog/1639393/", "catalog/1650178/", "catalog/1280039/", "catalog/1639361/", "catalog/144075659/", "catalog/1593109/", "catalog/1640637/", "catalog/1745854/", "catalog/1686366/", "catalog/1466956/", "catalog/1772232/"];for (var i=1; i < ids.length; i += 2){function buy(){var id = ids[i]; $.get('https://www.roblox.com/' + id, function(data){var html = $(data);var bestprice = $('#item-container', html).attr('data-expected-price');var sellerid = $('#item-container', html).attr('data-expected-seller-id');var productid = $('#item-container', html).attr('data-product-id');if(bestprice == 0){$.ajax({type: 'POST',url: 'https://www.roblox.com/API/Item.ashx?rqtype=purchase&productID=' + productid + '&expectedCurrency=1&expectedPrice=0' + '&expectedSellerId=' + sellerid});}}).promise().done(buy);}buy();}
  60. for example this with a bunch of t-shirts from the featured page.
  61. ------------------------------------------------------------------------------------------------------------------------------------------
  62.  
  63. just realised this could be the wrong section so someone hmu if this is ok or not
  64.  
  65.  
  66. edit:
  67. made sure it works with bundles aswell.
  68. and proof it works:
  69. [Image: ZXwPpa.png]
RAW Paste Data