Back to scripts

Sell Duplicate Blooks

utility

Automatically sells all duplicate Blooks

2024-03-20v1.0.0Community

Use at your own risk. This script may violate Blooket's Terms of Service.

Usage

Steps

  1. Ensure you are logged in
  2. Run the script
  3. Wait for automatic selling to complete
  4. Check the amount of tokens received

Notes

  • Script will keep one copy of each Blook
  • Selling operation cannot be undone
  • Recommended to record owned Blooks before selling

Requirements

  • Must have duplicate Blooks
  • Requires stable internet connection

Code

async function sellDuplicates() {
  const response = await fetch('https://api.blooket.com/api/users/blooks', {
    headers: {
      "content-type": "application/json",
      "X-Blooket-Build": "0"
    }
  });
  
  if (!response.ok) {
    alert('Failed to get Blooks');
    return;
  }
  
  const blooks = await response.json();
  const duplicates = Object.entries(blooks).filter(([_, count]) => count > 1);
  
  for (const [blook, count] of duplicates) {
    const sellResponse = await fetch('https://api.blooket.com/api/users/sellblook', {
      method: "PUT",
      headers: {
        "content-type": "application/json",
        "X-Blooket-Build": "0"
      },
      body: JSON.stringify({
        blook,
        amount: count - 1
      })
    });
    
    if (!sellResponse.ok) {
      alert('Failed to sell duplicates');
      return;
    }
    
    await new Promise(resolve => setTimeout(resolve, 750));
  }
  
  alert('Successfully sold all duplicates!');
}

sellDuplicates();

Changelog

Version 1.0.0

2024-03-20
  • Initial version release
  • Support auto-selling duplicate Blooks
  • Keep one copy of each Blook