Skip to content

Instantly share code, notes, and snippets.

@the-pesar
Last active October 10, 2024 16:51
Show Gist options
  • Save the-pesar/1c43d581fd613d79493f25388a9c5df1 to your computer and use it in GitHub Desktop.
Save the-pesar/1c43d581fd613d79493f25388a9c5df1 to your computer and use it in GitHub Desktop.
GOAT airdrop script
const headers = {
Authorization: "$token", // replace your token here
}
async function delay(ms) {
return new Promise((reslove) => setTimeout(() => reslove(true), ms))
}
async function getMissions() {
const res = await fetch("https://api-mission.goatsbot.xyz/missions/user", {
headers,
})
const data = await res.json()
return Object.values(data).flat(1)
}
async function completeAllOfMissions(missions) {
for (let i = 0; i < missions.length; i++) {
const res = await fetch(
`https://dev-api.goatsbot.xyz/missions/action/${missions[i]._id}`,
{
method: "POST",
headers,
}
)
console.log(i, res.status)
await delay(500)
}
}
async function viewAdv() {
const res = await fetch(
"https://dev-api.goatsbot.xyz/missions/action/66db47e2ff88e4527783327e",
{ method: "POST", headers }
)
const data = await res.json()
console.log("adv -", data.status ?? data.message)
}
async function makeMoney() {
const missions = await getMissions()
await completeAllOfMissions(missions)
await viewAdv()
setInterval(viewAdv, 60000)
}
makeMoney()
console.log("excuted: started...")
@erfann33
Copy link

erfann33 commented Oct 10, 2024 via email

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