Advertisement
connormce10

gulag bubbles 3.2

Jul 30th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function() {
  2.  
  3.  
  4.   // When a player is killed, tell him to go to gulag!
  5.     SWAM.on("playerKilled", function(data, dead, killer){
  6.         if (killer.id == game.myID)
  7.         {
  8.             Network.sendSay("Gulag for " + dead.name);
  9.         }
  10.     });
  11.     SWAM.on("playerKilled", function(data, dead, killer){
  12.         if (dead.id == game.myID)
  13.         {
  14.             Network.sendChat(killer.name + " I have a very particular set of skills. Skills I have acquired over a very long career. Skills that make me a nightmare for people like you. I will look for you, I will find you and I will kill you. ");
  15.         }
  16.     });
  17.     let lastPhraseTime = 0;
  18.  
  19.     SWAM.on("playerImpacted", function(data)
  20.     {
  21.         let playerId = data.players[0].id;
  22.  
  23.         // If it's not me, quit
  24.         if (playerId != game.myID)
  25.             return;
  26.  
  27.         let now = new Date().getTime();
  28.        
  29.         // If the time between the last message
  30.         // and now is less than 3 seconds, we exit
  31.         // to avoid being throttled by the server
  32.         if (now - lastPhraseTime < 3000)
  33.             return;
  34.  
  35.         let phrases = null;
  36.         let player = Players.get(playerId);
  37.         lastPhraseTime = now;
  38.  
  39.        
  40.          if (player.health > 0)
  41.         {
  42.             phrases = ["oof", "ouch", "owie"];
  43.         }
  44.        
  45.         else return;
  46.        
  47.         // choose a random phrase
  48.         let index = Tools.randInt(0, phrases.length - 1);
  49.  
  50.         // and send that phrase as a bubble
  51.         Network.sendSay(phrases[index]);
  52.     });
  53.  
  54.  
  55.  
  56.  
  57.         SWAM.registerExtension({
  58.             name: "Gulag bubbles 3.2: this has gone too far!",
  59.             id: "gu1ag4uandm3",
  60.             description: "use this extension to get people to hate you",
  61.             author: "connormce10",
  62.             version: "3.2"
  63.         });
  64.     }();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement