Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. options:
  2. PrestigeCost: 100000
  3. firstRank: Prisoner
  4. lastRank: God
  5.  
  6. pr: &a&lPrestige &8»
  7. error: &c&lError &8»
  8.  
  9. NoPerm: &cYou don't enough permissions to do that.
  10.  
  11.  
  12. PresTitle: &aCongratulations!
  13. PresSubtitle: &7You've Presitged to &a&l%{_pres}%
  14.  
  15. PresMsg: &f&lGG&a! You've Prestiged to &f&l%{_pres}%
  16. PresBroadcast: &a>&b>&c> &f%{_p}% &aPrestiged to &f%{_pres}%
  17.  
  18. Particle: heart
  19. ParticleCount: 50
  20.  
  21. Sound: ENTITY_PLAYER_LEVELUP
  22.  
  23. on join:
  24. {Prestige::playerdata::%uuid of player%} is not set
  25. set {Prestige::playerdata::%uuid of player%} to 0
  26.  
  27. function prestigeUp(p: player):
  28. set {_pU} to uuid of {_p}
  29. if {_p} doesn't have permission "essentials.kits.{@lastRank}":
  30. send "{@pr} &cYou need to be at rank &f{@lastRank} &cto Prestige." to {_p}
  31. set {_cant} to true
  32. {_cant} is not set
  33. set {_price} to {@PrestigeCost} * {Prestige::playerdata::%{_pU}%} if {Prestige::playerdata::%{_pU}%} > 0 else {@PrestigeCost}
  34. if {_p}'s balance >= {_price}:
  35. remove {_price} from {_p}'s balance
  36. add 1 to {Prestige::playerdata::%{_pU}%}
  37. console command "pex user %{_p}% group remove {@lastRank}"
  38. console command "pex user %{_p}% group add {@firstRank}"
  39. teleport {_p} to spawn of (world of {_p})
  40. set {_pres} to {Prestige::playerdata::%{_pU}%}
  41. send {_p} title "{@PresTitle}" with subtitle "{@PresSubtitle}" for 3 seconds
  42. send "{@pr} {@PresMsg}" to {_p}
  43. send "{@PresBroadcast}" to all players
  44. loop all players in radius 50 around {_p}:
  45. show {@ParticleCount} "{@Particle}" particles at {_p} for loop-player
  46. play "{@Sound}" to {_p}
  47. else:
  48. send "{@pr} &cYou don't have enough money. &7&o(Cost: &f$%{_price}%&7&o)" to {_p}
  49.  
  50.  
  51.  
  52. command /prestige [<text>] [<offlineplayer>] [<integer>]:
  53. aliases: pres
  54. trigger:
  55. if arg-1 is "help":
  56. if player has permission "prestige.help":
  57. send "{@pr} &a/pres help &8- &7Shows this message."
  58. send "{@pr} &a/pres set <player> <number> &8- &7Change player's prestige."
  59. send "{@pr} &a/pres &8- &7To prestige."
  60. stop
  61. else:
  62. send "{@NoPerm}"
  63. stop
  64.  
  65. if arg-1 is "set":
  66. if player has permission "prestige.set":
  67. if arg-2 is set:
  68. if arg-3 is set:
  69. set {Prestige::playerdata::%uuid of arg-2%} to arg-3
  70. send "{@pr} &aSuccessfully set &f%arg-2%&a's prestige to &f%arg-3%" to player
  71. send "{@pr} &aYour prestige has been manually set to &f%arg-3%&a." to arg-2
  72. stop
  73. else:
  74. send "{@error} &cMissing Prestige number."
  75. stop
  76. else:
  77. send "{@error} &cMissing player name."
  78. stop
  79. else:
  80. send "{@NoPerm}"
  81. stop
  82. else:
  83. prestigeUp(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement