Advertisement
DoctorX13

XAdminMode

Dec 5th, 2019 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. //Script Created by Senior S
  2. //You are able to edit it as you pleasure
  3.  
  4. //Arrays: ONLY EDIT AdminKit!!
  5. am = 0;
  6. AdminKit = "admin"; //Here set the name of the admin kit.
  7.  
  8. //Translations:
  9. adminmode_on = "You now are in admin mode";
  10. adminmode_off = "You desactive the admin mode";
  11.  
  12. command adminmode(){
  13. permission = "admin";
  14. execute(){
  15. if(am == 0){
  16. player.god = true;
  17. player.sudo("/kit " + AdminKit);
  18. player.message(adminmode_on);
  19. am = 1;
  20. }
  21. else {
  22. player.god = false;
  23. server.execute("ci " + player.name);
  24. player.message(adminmode_off);
  25. am = 0;
  26. }
  27. }
  28. }
  29.  
  30. event onPlayerGestured(player, gesture){
  31. if(am == 1 and gesture == "PunchLeft" or gesture == "PunchRight"){
  32. looking = player.look.getBarricade();
  33. if(looking == false){
  34. return;
  35. }
  36. if(looking.hasDoor() == true){
  37. dr = looking.getDoor();
  38. if(dr.isOpen == true){
  39. dr.close();
  40. }
  41. else {
  42. dr.open();
  43. }
  44. }
  45. else if(looking.hasStorage() == true){
  46. se = looking.getStorage();
  47. se.open(player);
  48. }
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement