Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         bypass
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.2
  5. // @description  shows how to use coffeescript compiler
  6. // @author       You
  7. // @match        http://agarioplayy.org
  8. // @name           Site - CoffeeScript
  9. // @description    CoffeeScript script
  10. // @author         Benjamin
  11. // @namespace      http://spiralx.org/
  12. // @icon           http://tampermonkey.net/favicon.ico
  13. // @match          <$URL$>
  14. // @grant          none
  15. // @run-at         document-end
  16. // ==/UserScript==
  17.  
  18. const chat = document.querySelector("#chat_textbox");
  19. var swears2 = [
  20.     "hitler",
  21.     "fuck",
  22.     "io",
  23.     "com",
  24.     "pussy",
  25.     "bitch",
  26.     "gay",
  27.     "nigger",
  28.     "fag",
  29.     "cunt",
  30.     "cock",
  31.     "dick",
  32.     "shit"
  33. ];
  34.  
  35. function addTxt(word, chr) {
  36.     let st = "";
  37.     for (let i = 0; i < word.length; i++) {
  38.         st += word.charAt(i) + chr;
  39.     }
  40.     return st;
  41. }
  42.  
  43. function bypass(str) {
  44.     try {
  45.         str = str.split(" ");
  46.     } catch (e) {
  47.  
  48.     }
  49.     var chr = "\u200B";
  50.  
  51.     var empt = "";
  52.     str.forEach(word => {
  53.         for (let i = 0; i < swears2.length; i++) {
  54.             const swear = swears2[i];
  55.             if (word.toLowerCase().indexOf(swear.toLowerCase()) !== -1) {
  56.                 empt += addTxt(word, chr) + " ";
  57.                 return;
  58.             }
  59.         }
  60.         empt += word + " ";
  61.  
  62.     })
  63.     return empt;
  64. }
  65.  
  66. // Chat stuff
  67. chat.setAttribute('maxlength', 999999);
  68. $("#chat_textbox").unbind("cut copy paste")
  69. window.alert = function () {
  70.     return null;
  71. }
  72. chat.addEventListener("keydown", function (ev) {
  73.     if (ev.key == " ") {
  74.         const val = bypass(chat.value);
  75.         chat.value = val.substr(0, val.length - 1);
  76.         return;
  77.     }
  78. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement