SHARE
TWEET

Untitled

a guest May 20th, 2019 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.input > input');
  2. let btn = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.input > button');
  3.  
  4. let buttons = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.bottom-section > .buttons');
  5.  
  6. let substr = 'SPIERDALAJ';
  7.  
  8. let emo = ['ez','ts','ws','cz','dz','ps','bl',];
  9.  
  10. let onStatus = true;
  11. let offStatus = false;
  12.  
  13. let p = 0;
  14.  
  15. let timerCl = 1000;
  16.  
  17. let timer = setInterval(function(){
  18. p++;
  19. if(p === emo.length){p = 0};
  20. input.value =`/avatar ${emo[p]}`;
  21.  
  22. btn.click()
  23. },timerCl)
  24.  
  25.  
  26.  
  27. function deleteNotice(){
  28.     document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelectorAll('.log > p.notice').forEach(cmd => {
  29.         cmd.style.display = 'none';
  30.     });
  31. }
  32.  
  33. let del = setInterval(deleteNotice,timerCl);
  34.  
  35.  
  36. function stopAvatar(){
  37.  
  38.     clearInterval(timer)
  39.     clearInterval(del)
  40. }
  41.  
  42.  
  43.  orteza
  44. function startAvatar(){
  45.  
  46.  
  47.     timer = setInterval(function(){
  48.         p++;
  49.         if(p === emo.length){p = 0};
  50.         input.value =`/avatar ${emo[p]}`;
  51.        
  52.         btn.click()
  53.         },timerCl)
  54.         del = setInterval(deleteNotice,timerCl)
  55. }
  56.  
  57. let returnOn = (()=>`<button class="on-btn">ON</button>`);
  58. let returnOff = (()=>`<button class="off-btn">OFF</button>`);
  59.  
  60. let returnInput = (()=>`<input class="speed" type="number"><button class="go">OK</button>`);
  61.  
  62. buttons.insertAdjacentHTML('beforeend',returnOn());
  63. buttons.insertAdjacentHTML('beforeend',returnOff());
  64.  
  65. let on = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.on-btn');
  66. let off = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.off-btn');
  67. let inp = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.speed');
  68.  
  69. on.style.backgroundColor = '#3e3e3e';
  70.  
  71. on.addEventListener('click',()=>{
  72.     onStatus = true;
  73.     if(offStatus){
  74.         on.style.backgroundColor = '#3e3e3e'
  75.         off.style.backgroundColor = '#244967'
  76.  
  77.         startAvatar();
  78.  
  79.         offStatus = false;
  80.     }
  81. })
  82.  
  83. off.addEventListener('click',()=>{
  84.     offStatus = true;
  85.     if(onStatus){
  86.         on.style.backgroundColor = '#244967';
  87.         off.style.backgroundColor = '#3e3e3e';
  88.         stopAvatar();
  89.         onStatus = false;
  90.     }
  91. })
  92.  
  93. document.querySelector('.gameframe').contentWindow.document.querySelector('.go').addEventListener('click',()=>{
  94.     timerCl = parseInt(document.querySelector('.gameframe').contentWindow.document.querySelector('.header-btns > input').value)
  95. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top