SHARE
TWEET

iScript v1.0

a guest Aug 13th, 2018 187 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //iScript v1.0 by iDomi.
  2. //Credits to undefined and state.
  3.  
  4. global owner = "iDomi";
  5. // Change iDomi to your name.
  6.  
  7. global credFail = false;
  8.  
  9. def Print(s, c){ConsoleMessage(s, c);} def Pop(s, c){BigMessage(s, c);}
  10. def PrintAll(c){ConsoleMessageAllPlayers(c);} def PopAll(c){BigMessageAllPlayers(c);}
  11.  
  12. def OnEverySecond(player){
  13.     if(credFail == true){
  14.         var fail = " Script won't work if credit is edited.\n";
  15.         PrintAll(player, fail * 2);
  16.     }
  17. }
  18.  
  19. def OnPlayerEnterPark(player){
  20.     var msg = "^9This park is using ^2iScript v1.0^9.\n^9Type ^7iHelp ^9for Command list.";
  21.     Print(player, msg);
  22. }
  23.  
  24. def ShowCommandList(player){
  25.     var cmdList_title = "^2iScript commands:\n";
  26.     var cmdList_gravity = "^0iGravity <moon/normal> ^7: Change the park's gravity.";
  27.     var cmdList_tint = "^0iTint <integer> ^7: Tint your character.\n";
  28.     var cmdList_info = "^0iInfo ^7: Info about iScript.";
  29.     var cmdList_alert = "^0iAlert <string> ^7: Send an alert msg to all players.\n";
  30.     var cmdList_players = "^0iPlayers ^7: Show how many players in this park."
  31.     Print(player, cmdList_title + cmdList_gravity);
  32.     Print(player, cmdList_tint + cmdList_info);
  33.     Print(player, cmdList_alert + cmdList_players);
  34. }
  35.  
  36. def OnPlayerChat(player, text){
  37.     var bigMsg_ownCmd = ["^9Gravity changed to ^2Moon^9.", "^9Gravity changed to ^2Normal^9.", "^1Alert: ^7"];
  38.     var conMsg_ownCmd = ["[^2iScript^7] ^9You changed the Gravity to ^2Moon^9.", "[^2iScript^7] ^9You changed the Gravity to ^2Normal ^9."];
  39.     if(credFail == false){
  40.         if(player == owner || player == "iDomi"){
  41.             if(text == "iGravity moon" || text == "iGravity 0.5" || text == "iGravity m"){
  42.                 Gravity(0.5);
  43.                 PopAll(bigMsg_ownCmd[0]);
  44.                 Print(player, conMsg_ownCmd[0]);
  45.             }
  46.             else if(text == "iGravity normal" || text == "iGravity 1" || text == "iGravity n"){
  47.                 Gravity(1);
  48.                 PopAll(bigMsg_ownCmd[1]);
  49.                 Print(player, conMsg_ownCmd[1]);
  50.             }
  51.             else if(text.find("iAlert") == 0){
  52.                 PopAll(bigMsg_ownCmd[2] + text.substr(text.find_first_of(" "), text.size() - 6));
  53.             }
  54.         }
  55.         var alp = ["a", "B", "c", "D", "f", "h", "i", "K", "l", "m", "N", "o", "Q", "R", "s", "T", "v", "w", "Y", "Z"];
  56.         var conMsg = ["[^2iScript^7] ^9iScript is created by iDomi. Current version is v1.0", "^9Color changed.", "^1Error^7!", "[^2iScript^7] ^9Players: ^7"];
  57.         if(text == "iHelp"){
  58.             ShowCommandList(player);
  59.         }
  60.         var crVal = conMsg[0].substr(conMsg[0].find_first_of("y") + 1, conMsg[0].size() - 62);
  61.         if(crVal == " " + alp[6] + alp[3] + alp[11] + alp[9] + alp[6]){
  62.             if(text == "iInfo"){
  63.                 Print(player, conMsg[0]);
  64.             }
  65.         }
  66.         if(crVal != " " + alp[6] + alp[3] + alp[11] + alp[9] + alp[6]){
  67.             credFail = true;
  68.         }
  69.         if(text.find("iTint") == 0){
  70.             TintPlayer(player, to_int(text.substr(text.find_first_of(" "), text.size() - 5)));
  71.             Pop(player, conMsg[1]);
  72.         }
  73.         if(text == "iPlayers"){
  74.             Print(player, conMsg[3] + to_string(CountPlayers()));
  75.         }
  76.         if(player != owner){
  77.             if(text.find("iGravity") == 0 || text.find("iAlert") == 0){
  78.                 var noAcc = "^1Error: ^7You don't have access."; Print(player, noAcc);
  79.             }
  80.         }
  81.     }
  82. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top