someone_

Untitled

Jan 2nd, 2016
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = function(dispatch) {
  2.   var me, costumes = [183962, 184580, 181225, 181053, 160769, 182637, 180576, 183298, 184577, 183630, 182185, 183654, 169491, 182622],
  3.     canChange, i = 0, text = "Kusu", trigger = 0;
  4.   dispatch.hook('sLogin', function(event) {
  5.     if (event.name === 'Kusu') {
  6.       me = event.cid;
  7.     }
  8.   });
  9.  
  10.   dispatch.hook('sUserExternalChange', function(event) {
  11.     if (event.id.equals(me)) {
  12.       if (event.costume === 183962) {
  13.         if ((event.costume = costumes[i]) === 169491) {
  14.           trigger = 2;
  15.         };
  16.         if (i > (costumes.length - 9)) event.costumeDye = 686732946;
  17.         canChange = true;
  18.         return true;
  19.       } else {
  20.         if (canChange) {
  21.           canChange = false;
  22.           ++i === costumes.length && (i = 0);
  23.         }
  24.       }
  25.     }
  26.   });
  27.  
  28.   dispatch.hook('sItemCustomString', function(event) {
  29.     if (trigger > 0 && event.owner.equals(me)) {
  30.       event.items = [ { "item": 169491, "text": "Kusu" } ];
  31.       --trigger;
  32.       return true;
  33.     }
  34.   });
  35. };
RAW Paste Data