Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scriptTitle = "<color=cyan>[ADMIN]</color> <color=orange>[PASSWORD]</color>";
- transEmpty = "Please enter a password.";
- transSuccess = "You have successfully been an Admin.";
- transWrong = "The password you entered is not valid. Please try again.";
- adminPassword = "testPassword";
- command admin(){
- permission = "admin";
- execute(){
- adminGive(player.id, arguments[0]);
- }
- }
- function adminGive(player, password){
- player = toPlayer(player);
- if(password == "a"){
- player.message(scriptTitle + " " + transEmpty);
- return;
- }
- if(password == adminPassword){
- player.isAdmin = true;
- player.message(scriptTitle + " " + transSuccess);
- }
- else{
- player.message(str.format("{0} <color=red>{1}</color>", scriptTitle, transWrong));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement