Advertisement
Guest User

Untitled

a guest
May 21st, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Answergarden Hack
  3. // @version      0.7
  4. // @description  try to take over the world!
  5. // @match        https://answergarden.ch/view/*
  6. // @grant        none
  7. // ==/UserScript==
  8. //🐱‍💻
  9. var hack = "🐱‍💻"; //You´r Message!
  10. var count = 4; //You´r Count!
  11.  
  12. var id = 0;//Current PageID!
  13.  
  14. function runOnPageNotFound(){ //Edit if u wannt!
  15.     goto(id - 1);
  16. }
  17. function runOnPageIsLocked(){ //Edit if u wannt!
  18.     goto(id + 1);
  19. }
  20.  
  21. (function() {
  22.     'use strict';
  23.     document.getElementById('topbarhomebox').innerHTML = "<h1>" + hack + " " + Number(localStorage.getItem("hackcount")) + "/" + count + " - Seiten: " + Number(localStorage.getItem("hackpagecount")) + "</h1>";
  24.     id = Number(document.location.href.replace("https://answergarden.ch/view/", ""));
  25.     if(document.title.includes("Error")){
  26.         runOnPageNotFound();
  27.     }else if(document.toString().indexOf("This AnswerGarden has been locked by the creator.") != -1){
  28.         runOnPageIsLocked();
  29.     }else{
  30.         if(localStorage.getItem("trys") >= count){
  31.             localStorage.setItem("hackpagecount", Number(localStorage.getItem("hackpagecount")) + 1);
  32.             goto(id + 1);
  33.         }else{
  34.             localStorage.setItem("trys", Number(localStorage.getItem("trys")) + 1);
  35.             var answer = document.getElementById('answer');
  36.             answer.value = hack; // Set the Input
  37.             localStorage.setItem("hackcount", Number(localStorage.getItem("hackcount")) + 1); // Count the HackCount +1!
  38.             setTimeout(function() {
  39.                 document.getElementById("submit").click(); // Summit you´r Message
  40.             },1000);
  41.         }
  42.     }
  43. })();
  44.  
  45. function goto(id) {
  46.     localStorage.setItem("hackcount", 0); // Set the local HackCount to 0
  47.     localStorage.setItem("trys", 0); // Set the local tyrs for the Page to 0
  48.     localStorage.setItem("newid", id); // Set the new ID into the local Storage!
  49.     window.location.href = "https://answergarden.ch/view/" + id; // Go to the new Page!
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement