Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. // ==UserScript==
  2. // @name DiscordTroll
  3. // @namespace http://betterdiscord.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author ___
  7. // @match http*://discordapp.com/*
  8. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
  9. // @require https://raw.githubusercontent.com/brandonaaron/livequery/1.1.1/jquery.livequery.js
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. donttry = false;
  15. var observer = new MutationObserver(function(mutations) {
  16. mutations.forEach(function(mutation) {
  17. if (window.location.href == 'https://discordapp.com/register') {
  18. var rand1 = Math.floor(Math.random() * (9999999999- 1000 + 1)) + 1000;
  19. var rand2 = Math.floor(Math.random() * (9999999999- 1000 + 1)) + 1000;
  20. $('input[id="register-email"]').val(rand1+'@'+'gmail.com');
  21. $('input[id="register-username"]').val(rand1);
  22. $('input[id="register-password"]').val('123456789987654321');
  23. };
  24. if ((window.location.href == 'https://discordapp.com/channels/@me') || (window.location.href == 'https://discordapp.com/channels/@me?')) {
  25. $('button[data-reactid=".0.5.$=1$NewUserFlow.0.0.1.1"]').livequery(function(){
  26. $('button[data-reactid=".0.5.$=1$NewUserFlow.0.0.1.1"]').click();
  27. });
  28. $('button[data-reactid=".0.5.$=1$ChangeLog.0.0.0.1"]').livequery(function(){
  29. $('button[data-reactid=".0.5.$=1$ChangeLog.0.0.0.1"]').click();
  30. });
  31. if (donttry != true) {
  32. $(".guilds-add").click();
  33. $(".action.join .btn").click();
  34. $(".create-guild-container input").val('4qEFe4S');//Replace with the invite code of the server you want to auto join.
  35. $(".form.join-server .btn-primary").click();
  36. if ($('.error').text() == "(The instant invite is invalid or has expired.)") { // Change this text to what it's called in your language.
  37. donttry = true;
  38. $('.btn-default').click();
  39. simulateKeyPress("ESC");
  40. //donttry = false;
  41. }
  42. }
  43. };
  44. });
  45. });
  46. function simulateKeyPress(character) {
  47. jQuery.event.trigger({ type : 'keypress', which : character.charCodeAt(0) });
  48. console.log('keypressed: '+character.charCodeAt(0));
  49. }
  50. observer.observe(document.body, { childList: true, subtree: true, attributes: false, characterData: false });
  51. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement