Skip to content

Instantly share code, notes, and snippets.

@emesare
Last active February 25, 2024 16:16
Show Gist options
  • Save emesare/4ab6a43a5fbe1b1ef5764bdb76b782f3 to your computer and use it in GitHub Desktop.
Save emesare/4ab6a43a5fbe1b1ef5764bdb76b782f3 to your computer and use it in GitHub Desktop.
Danks asset.party slot claimer for s&box. NO LONGER SUPPORTED
// ==UserScript==
// @name Le claimer
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to claim yourself access to a game that doesn't exist (its a hoax)
// @author Dank (Discord: Dank#9470)
// @match https://asset.party/get/developer/preview
// @icon https://www.google.com/s2/favicons?sz=64&domain=asset.party
// @grant none
// ==/UserScript==
(function () {
'use strict';
var lastDrop = "";
// isNumeric: https://stackoverflow.com/questions/175739/
var isNumeric = function (str) {
return !isNaN(str) && !isNaN(parseFloat(str));
}
var isNewDrop = function () {
let nodes = document.querySelector('.tag').childNodes;
for (let i = 0; i < nodes.length; i++) {
let nodeText = nodes[i].textContent;
// Check to see if its the drop number then check if that drop number is different than last.
if (isNumeric(nodeText) && nodeText != lastDrop) {
return true;
}
}
return false;
}
var notify = function (title, text) {
if (window.Notification && Notification.permission === 'granted') {
// Send a notification that we tried to claim a slot.
new Notification(title, {
body: text,
// My profile pic, don't change!
icon: 'https://avatars.akamai.steamstatic.com/e4ae906ef560e0a6af53052b9de35cd79727291c_full.jpg',
});
}
console.log(text);
}
var DOMUpdate = function () {
// In case the website gets "updated".
let refreshDialog = document.querySelector('.components-reconnect-rejected');
if (refreshDialog != null) {
notify("Refreshing Site!", "Website update detected!");
location.reload();
}
let btn = document.querySelector("button.button.is-large.is-primary:enabled");
if (btn != null) {
if (!isNewDrop()) {
notify("Antibot Detected!", "If this wasnt antibot, report on github.");
return;
}
btn.click();
lastDrop = document.querySelector('.tag').childNodes[2].textContent;
notify("Claim Attempt!", "Your odds are pretty bad ngl");
}
};
console.log("LeClaimer version 0.3 by Dank (github.com/dankope)");
// Give perms to send our desktop notifications.
Notification.requestPermission().then(function (permission) {
if (permission === "granted") {
notify("LeClaimer Setup!", "Check back in a few years!");
}
});
// Hmmm today i will observe.
let MO = new MutationObserver(DOMUpdate);
MO.observe(document.body, {
attributes: true,
childList: true,
characterData: false,
subtree: true
});
})();
@emesare
Copy link
Author

emesare commented Aug 9, 2022

FAQ

Q: Does this automatically claim the slot or send me a notification?
A: Both.

Q: Does this run in the background / Can I do something else while it runs?
A: Yes.

Q: How do I use this?
A: See this guide by @n1clud3

Q: Is this against the rules?
A: As far as I know, no.

Q: What does this do?
A: Refer to first question.

Q: Will this automatically update when you update the code?
A: No. If there is an update to the script come back here and grab the latest.

Q: I keep getting LeClaimer: Unknown button ([], CLAIM) in the console, is it broken?
A: No this is just a debug measure that is really not needed however it does not affect anything right now, so I haven't removed it.

@zeroIQ2018
Copy link

do you have to refresh the site for the slots to appear?

@Copperearth
Copy link

do you have to refresh the site for the slots to appear?
it automatically refreshes. if it doesn't please press crtl + s and send it to Dank#9470 on discord

@emesare
Copy link
Author

emesare commented Aug 12, 2022

Fixed the issue with it not auto-refreshing on website update.

@EliteCombineSoldier
Copy link

is there a way to see the logs?

@Copperearth
Copy link

is there a way to see the logs?

if you open the browser console, it'll show you the logs since the last refresh. I don't think there is a way to make the logs persist through refreshes of the site unfortunately.

@emesare
Copy link
Author

emesare commented Aug 14, 2022

If you have an issue with the script not auto refreshing the page WHEN THE SITE UPDATES, please ctrl + s while the update dialog is on the screen so i can get the correct selector to match against.

@emesare
Copy link
Author

emesare commented Aug 15, 2022

Updating the auto refresh, turns out it wasn't an issue with the selector, I had the correct logic except for when the call to reload the page is happening apparently a lot of browsers don't like window.location.reload and instead want location.reload.

@qShadoww
Copy link

Do i need to keep the s&box tab open or i can browse on another tab with auto claim enabled?

@DogeSkii
Copy link

Do i need to keep the s&box tab open or i can browse on another tab with auto claim enabled?

you can leave it in the background

@EliteCombineSoldier
Copy link

I got a key
Thanks to dank

@Damien8er
Copy link

I got a key Thanks to dank

When did you get it?

@EliteCombineSoldier
Copy link

I got a key Thanks to dank

When did you get it?

14 hours ago 100 keys dropped

@AmogusNes
Copy link

Please update to new key system

@emesare
Copy link
Author

emesare commented Aug 19, 2022

Updated to new key system.

@DarDarDoor
Copy link

Just an fyi, they've changed the url of the dev preview to be https://asset.party/get/developer/preview instead of https://asset.party/~get so this script currently won't work unless you edit it

@emesare
Copy link
Author

emesare commented Aug 20, 2022

Just an fyi, they've changed the url of the dev preview to be https://asset.party/get/developer/preview instead of https://asset.party/~get so this script currently won't work unless you edit it

fixed, thank you!

@emesare
Copy link
Author

emesare commented Aug 21, 2022

Notice: I delete comments here if its idiotic

@Zorklis
Copy link

Zorklis commented Aug 21, 2022

Notice: I delete comments here if its idiotic

Ego much? the script doesn't work anymore, I had to manually enter because the script didn't do it for me
Edit: Hi Facepunch & Garry

@emesare
Copy link
Author

emesare commented Aug 22, 2022

Notice: I delete comments here if its idiotic

Ego much? the script doesn't work anymore, I had to manually enter because the script didn't do it for me

Ego? It literally is just spam comments with no actionable information. If it is not working for you feel free to fix it and send a message here, otherwise ctrl + s the page once the button becomes active and send it to me on discord.

Copy link

ghost commented Aug 27, 2022

This doesn't work anymore they detect bots now.

@WrightsonJD
Copy link

Also, I think if you used it, you are banned from entering in the raffles. I disabled the bot and tried entering in and it would not let me.

@emesare
Copy link
Author

emesare commented Aug 28, 2022

This doesn't work anymore they detect bots now.

fixed

Also, I think if you used it, you are banned from entering in the raffles. I disabled the bot and tried entering in and it would not let me.

Ouch, good thing steam accounts are free!

@emesare
Copy link
Author

emesare commented Sep 1, 2022

Due to the recent change and stance by Facepunch on botting, I have decided to stop updates for this. Also, I don't think the current version works but you are free to try it, however I suggest everyone to instead use the forums to try and get a slot through experience rather than luck.

@CrimsonCuttle
Copy link

CrimsonCuttle commented Dec 8, 2022

Any way to change the delay to every 6 hours? (every loop)
The rapid-fire clicking got me blocked for a while.
If there is a way to delay it to this much, I think the bot will once again be functional.

@CrimsonCuttle
Copy link

Also, I think if you used it, you are banned from entering in the raffles. I disabled the bot and tried entering in and it would not let me.

It doesn't ban you forever, but it does for a good while. I was able to enter manually again after some days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment