SHARE
TWEET

iScript v0.9

iDomi Aug 2nd, 2018 (edited) 271 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //iScript v0.9 by iDomi.
  2. //Credits to undefined and state.
  3.  
  4. GLOBAL owner = "iDomi";
  5. // Change the iDomi to your name.
  6.  
  7. GLOBAL credFail = "false";
  8.  
  9. def OnEverySecond(player){
  10.     if(credFail == "true"){
  11.         var fail = "Script won't work if credit is edited."; ConsoleMessage(player, fail); ConsoleMessage(player, fail);
  12.     }
  13. }
  14.  
  15. def OnPlayerEnterPark(player){
  16.     var msg = "^9This park is using ^2iScript v0.9^9.\n^9Type ^7iHelp ^9for Command list."; ConsoleMessage(player, msg);
  17. }
  18.  
  19. def ShowCommandList(player){
  20.     var cmdList_title = "^2iScript commands:";
  21.     var cmdList_gravity = "^0iGravity <moon/normal> ^7: Change the park's gravity.";
  22.     var cmdList_tint = "^0iTint <integer> ^7: Tint your character.";
  23.     var cmdList_info = "^0iInfo ^7: Info about iScript.";
  24.     var cmdList_alert = "^0iAlert <string> ^7: Send an alert msg to all players.";
  25.     ConsoleMessage(player, cmdList_title);
  26.     ConsoleMessage(player, cmdList_gravity);
  27.     ConsoleMessage(player, cmdList_tint);
  28.     ConsoleMessage(player, cmdList_info);
  29.     ConsoleMessage(player, cmdList_alert);
  30. }
  31.  
  32. def OnPlayerChat(player, text){
  33.     var bigMsg_ownCmd = ["^9Gravity changed to ^2Moon^9.", "^9Gravity changed to ^2Normal^9.", "^1Alert: ^7"];
  34.     var conMsg_ownCmd = ["[^2iScript^7] ^9You changed the Gravity to ^2Moon^9.", "[^2iScript^7] ^9You changed the Gravity to ^2Normal ^9."];
  35.     if(player == owner || player == "iDomi"){
  36.         if(text == "iGravity moon" || text == "iGravity 0.5" || text == "iGravity m"){
  37.             Gravity(0.5);
  38.             BigMessageAllPlayers(bigMsg_ownCmd[0]);
  39.             ConsoleMessage(player, conMsg_ownCmd[0]);
  40.         }
  41.         else if(text == "iGravity normal" || text == "iGravity 1" || text == "iGravity n"){
  42.             Gravity(1);
  43.             BigMessageAllPlayers(bigMsg_ownCmd[1]);
  44.             ConsoleMessage(player, conMsg_ownCmd[1]);
  45.         }
  46.         else if(text.find("iAlert") == 0){
  47.             var alertVal = text.substr(text.find_first_of(" ") + 1, text.size() - 7);
  48.             BigMessageAllPlayers(bigMsg_ownCmd[2] + alertVal);
  49.         }
  50.     }
  51.     var alp = ["a", "B", "c", "D", "f", "h", "i", "K", "l", "m", "N", "o", "Q", "R", "s", "T", "v", "w", "Y", "Z"];
  52.     var conMsg = ["[^2iScript^7] ^9iScript is created by iDomi. Current version is v0.9", "^9Color changed.", "^1Error^7!"];
  53.     if(text == "iHelp"){
  54.         ShowCommandList(player);
  55.     }
  56.     var crFrm = conMsg[0].find_first_of("y");
  57.     var crLen = conMsg[0].size() - 62;
  58.     var crVal = conMsg[0].substr(crFrm + 1, crLen);
  59.     if(crVal == " " + alp[6] + alp[3] + alp[11] + alp[9] + alp[6]){
  60.         credFail = "false";
  61.         if(text == "iInfo"){
  62.             ConsoleMessage(player, conMsg[0]);
  63.         }
  64.     }
  65.     if(crVal != " " + alp[6] + alp[3] + alp[11] + alp[9] + alp[6]){
  66.         credFail = "true";
  67.     }
  68.     if(text.find("iTint") == 0){
  69.         var tintVal = to_int(text.substr(text.find_first_of(" ") + 1, text.size() - 6));
  70.         TintPlayer(player, tintVal); BigMessage(player, conMsg[1]);
  71.     }
  72.     if(player != owner){
  73.         if(text.find("iGravity") == 0 || text.find("iAlert") == 0){
  74.             var noAcc = "^1Error: ^7You don't have access."; ConsoleMessage(player, noAcc);
  75.         }
  76.     }
  77. }
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