Advertisement
AEAEAEAEarray

battel script

Oct 10th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.client = MPP.client;
  2.  
  3. const list = [];
  4.  
  5. class country {
  6.     list() {
  7.         if (list.length < 1) return null;
  8.         return list.join(' ').replaceAll('  ', ' ');
  9.     }
  10.  
  11.     add(name) {
  12.         if (!name) return "No country name entered";
  13.         list.push(name.toUpperCase());
  14.     }
  15.  
  16.     remove(name) {
  17.         if (!name) return "No country name entered";
  18.         if (list.indexOf(name.toUpperCase()) === -1) return "This country provide dosn't exist";
  19.         delete list[list.indexOf(name.toUpperCase())];
  20.     }
  21.  
  22.     start(name) {
  23.         if (name) return name+" is not function";
  24.         return undefined;
  25.     }
  26.  
  27.     pause(name) {
  28.         if (name) return name+" is not a function";
  29.         return undefined;
  30.     }
  31.  
  32.     resume(name) {
  33.         if (name) return name+" is not a function";
  34.         return undefined;
  35.     }
  36.  
  37.     stop(name) {
  38.         if (name) return name+" is not a function";
  39.         return undefined;
  40.     }
  41.  
  42.     size() {
  43.         return list.length;
  44.     }
  45. }
  46.  
  47. let countries = new country();
  48.  
  49. const Admin = ["368bff184db7a3c669da1ca5", "384bfbeb4cec729b49d7070b", "b31780465ee191c1d6bc0474"];
  50. client.on("a", msg => {
  51.     if (msg.a.startsWith("countries." || "Admin.") && Admin.includes(msg.p.id)) {
  52.         let out = "";
  53.         try {
  54.             out = `‹- ${eval(msg.a.substring(0).trim())}`
  55.         } catch (err) {
  56.             if (err) {
  57.                 out = `❎ ${err}`
  58.             }
  59.         }
  60.         client.sendArray([{ m: 'a', message: out }])
  61.     }
  62.     if (!Admin.includes(msg.p.id) && msg.a.startsWith("countries." || "Admin.")) {
  63.         MPP.chat.send("You don't have any permission to use this command")
  64.     }
  65. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement