Skip to content

Instantly share code, notes, and snippets.

@Apearson75
Last active April 14, 2023 16:40
Show Gist options
  • Save Apearson75/e46aa87f515a49eae7255f37492169b1 to your computer and use it in GitHub Desktop.
Save Apearson75/e46aa87f515a49eae7255f37492169b1 to your computer and use it in GitHub Desktop.

Roblox Free Limited Sniper

How to use:

  • Go to the roblox website and paste this code into the url bar.
javascript:(async()=>{let r=new Audio("https://cdn.discordapp.com/attachments/853331978538844210/1096471895488081960/silence.mp3");r.loop=!0,r.play();let n=null,i=null,a=null,d=null,s=!1,l=1750,u=0,f="https://catalog.roblox.com/v1/search/items?category=All&limit=120&maxPrice=0&salesTypeFilter=2&SortType=3",p=e=>new Promise(t=>setTimeout(t,e));async function h(){let e=await fetch(`https://apis.roblox.com/marketplace-sales/v1/item/${a}/purchase-item`,{method:"POST",credentials:"include",headers:{"x-csrf-token":Roblox.XsrfToken.getToken(),"Content-Type":"application/json"},body:JSON.stringify({collectibleItemId:a,collectibleProductId:d,expectedCurrency:1,expectedPrice:0,expectedPurchaserId:Roblox.CurrentUser.userId,expectedPurchaserType:"User",expectedSellerId:i,expectedSellerType:"User",idempotencyKey:CoreUtilities.uuidService.generateRandomUuid()})});if(e.status===200){let t=await e.json();t.purchased?(u++,console.log(`Purchased: ${u}`)):t.errorMessage==="QuantityExhausted"?(s=!1,l=1750,console.log("Stock is Gone")):console.log("Error On Purchase")}else console.log("Error On Request")}async function m(){let e=await fetch(f,{headers:{"x-csrf-token":Roblox.XsrfToken.getToken()},credentials:"include"});if(e.status===200){let t=await e.json();if(t.data.length>0){n=t.data[0].id;let c=await fetch(`https://catalog.roblox.com/v1/catalog/items/${n}/details?itemType=Asset`,{headers:{"x-csrf-token":Roblox.XsrfToken.getToken()},credentials:"include"});if(c.status===200){let o=await c.json();if(o.priceStatus)return{status:!1};{i=o.creatorTargetId;let x=await(await fetch("https://apis.roblox.com/marketplace-items/v1/items/details",{method:"POST",headers:{"x-csrf-token":Roblox.XsrfToken.getToken(),"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({itemIds:[o.collectibleItemId]})})).json();return{status:!0,ID:o.collectibleItemId,p_ID:x[0].collectibleProductId}}}else return console.log(`Uh oh: ${c.status}`),{status:!1}}else return{status:!1}}else return await p(5e3),{status:!1}}for(;;){if(!s){let e=await m();e.status?(s=!0,l=500,a=e.ID,d=e.p_ID):console.log("Not Yet")}s&&await h(),await p(l)}})();

Source Code:

You can find it here

javascript:(async()=>{let r=new Audio("https://cdn.discordapp.com/attachments/853331978538844210/1096471895488081960/silence.mp3");r.loop=!0,r.play();let n=null,i=null,a=null,d=null,s=!1,l=1750,u=0,f="https://catalog.roblox.com/v1/search/items?category=All&limit=120&maxPrice=0&salesTypeFilter=2&SortType=3",p=e=>new Promise(t=>setTimeout(t,e));async function h(){let e=await fetch(`https://apis.roblox.com/marketplace-sales/v1/item/${a}/purchase-item`,{method:"POST",credentials:"include",headers:{"x-csrf-token":Roblox.XsrfToken.getToken(),"Content-Type":"application/json"},body:JSON.stringify({collectibleItemId:a,collectibleProductId:d,expectedCurrency:1,expectedPrice:0,expectedPurchaserId:Roblox.CurrentUser.userId,expectedPurchaserType:"User",expectedSellerId:i,expectedSellerType:"User",idempotencyKey:CoreUtilities.uuidService.generateRandomUuid()})});if(e.status===200){let t=await e.json();t.purchased?(u++,console.log(`Purchased: ${u}`)):t.errorMessage==="QuantityExhausted"?(s=!1,l=1750,console.log("Stock is Gone")):console.log("Error On Purchase")}else console.log("Error On Request")}async function m(){let e=await fetch(f,{headers:{"x-csrf-token":Roblox.XsrfToken.getToken()},credentials:"include"});if(e.status===200){let t=await e.json();if(t.data.length>0){n=t.data[0].id;let c=await fetch(`https://catalog.roblox.com/v1/catalog/items/${n}/details?itemType=Asset`,{headers:{"x-csrf-token":Roblox.XsrfToken.getToken()},credentials:"include"});if(c.status===200){let o=await c.json();if(o.priceStatus)return{status:!1};{i=o.creatorTargetId;let x=await(await fetch("https://apis.roblox.com/marketplace-items/v1/items/details",{method:"POST",headers:{"x-csrf-token":Roblox.XsrfToken.getToken(),"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({itemIds:[o.collectibleItemId]})})).json();return{status:!0,ID:o.collectibleItemId,p_ID:x[0].collectibleProductId}}}else return console.log(`Uh oh: ${c.status}`),{status:!1}}else return{status:!1}}else return await p(5e3),{status:!1}}for(;;){if(!s){let e=await m();e.status?(s=!0,l=500,a=e.ID,d=e.p_ID):console.log("Not Yet")}s&&await h(),await p(l)}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment