Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. // ==UserScript==
  2. // @name TagPro End of Game Timer
  3. // @version 0.2
  4. // @description Show how much time is left once a game ends until you're put back into the joiner
  5. // @include http://tagpro-*.koalabeast.com:*
  6. // @include http://tangent.jukejuice.com:*
  7. // @include http://*.newcompte.fr:*
  8. // @author Some Ball -1
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. tagpro.ready(function() {
  13. tagpro.socket.on('end',function() {
  14. var timeleft = 25,
  15. timer = new PIXI.Text('25 seconds left',
  16. {
  17. font: "bold 48pt arial",
  18. fill: "#ffffff",
  19. stroke: "#000000",
  20. strokeThickness: 2
  21. });
  22. timer.anchor.x = 0.5, timer.anchor.y = 0.5, timer.x = document.getElementById('viewport').width/2, timer.y = 75;
  23. tagpro.renderer.layers.ui.addChild(timer);
  24. setInterval(function() {
  25. timer.setText(--timeleft+' seconds left');
  26. },1000);
  27. });
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement