Advertisement
Guest User

[uScript] Admin Password / By ChearTman

a guest
Feb 24th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. scriptTitle = "<color=cyan>[ADMIN]</color> <color=orange>[PASSWORD]</color>";
  2.  
  3. transEmpty = "Please enter a password.";
  4. transSuccess = "You have successfully been an Admin.";
  5. transWrong = "The password you entered is not valid. Please try again.";
  6.  
  7. adminPassword = "testPassword";
  8.  
  9. command admin(){
  10.     permission = "admin";
  11.     execute(){
  12.         adminGive(player.id, arguments[0]);
  13.     }
  14. }
  15.  
  16. function adminGive(player, password){
  17.     player = toPlayer(player);
  18.    
  19.     if(password == "a"){
  20.         player.message(scriptTitle + " " + transEmpty);
  21.         return;
  22.     }
  23.        
  24.     if(password == adminPassword){
  25.         player.isAdmin = true;
  26.         player.message(scriptTitle + " " + transSuccess);
  27.     }
  28.     else{
  29.         player.message(str.format("{0} <color=red>{1}</color>", scriptTitle, transWrong));
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement