cdw1p

KahootFlooder.js

Oct 18th, 2020 (edited)
756
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. const Kahoot = require('kahoot.js-updated')
  2.  
  3. function createClient(i, name, gamePin) {
  4. try {
  5. var client = new Kahoot;
  6. console.log('Joining kahoot... ' + i)
  7. var b = name
  8. client.join(gamePin, b+i)
  9. client.on('questionStart', question => {
  10. console.log('A new question has started, answering the first answer.')
  11. setTimeout(() => {
  12. question.answer(Math.floor(Math.random()*4))
  13. }, Math.random() * 4)
  14. })
  15. return client
  16. } catch (e) {}
  17. }
  18.  
  19. (async() => {
  20. let gamePin = '2236050'
  21. let jmlBot = 10
  22. for (let i = 0; i < jmlBot; i++) {
  23. setTimeout(() => {
  24. createClient(i+1, 'Robot Cerdas @ ', gamePin)
  25. }, (i*200))
  26. }
  27. })()
Advertisement
Add Comment
Please, Sign In to add comment