-
-
Save emesare/4ab6a43a5fbe1b1ef5764bdb76b782f3 to your computer and use it in GitHub Desktop.
// ==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 | |
}); | |
})(); |
it didnt auto-refresh after the auto-refresh fix
Need more info to fix this, if anyone wants to fix this and send me the correct selector feel free.
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.
do you have to refresh the site for the slots to appear?
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
Fixed the issue with it not auto-refreshing on website update.
is there a way to see the logs?
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.
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.
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
.
Do i need to keep the s&box tab open or i can browse on another tab with auto claim enabled?
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
I got a key
Thanks to dank
I got a key Thanks to dank
When did you get it?
I got a key Thanks to dank
When did you get it?
14 hours ago 100 keys dropped
Please update to new key system
Updated to new key system.
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
Just an fyi, they've changed the url of the dev preview to be
https://asset.party/get/developer/preview
instead ofhttps://asset.party/~get
so this script currently won't work unless you edit it
fixed, thank you!
Notice: I delete comments here if its idiotic
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
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.
This doesn't work anymore they detect bots now.
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.
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!
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.
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.
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.
This is fine.