Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *:/skillup $player = >>>
- if(equals(player(),$player)){
- die(concat(color(c),'You may not demote yourself'))
- }
- assign(@ranks,array(Default,Survivor,student,Builder,teacher,professor,scholar))
- if(nand(or(array_contains(pgroup(),'teacher'),array_contains(pgroup(),'professor'),array_contains(pgroup(),'scholar')),or(array_contains(pgroup(),'mod'),array_contains(pgroup(),'admin'),array_contains(pgroup(),'sadmin')))){
- if(nor(array_contains(pgroup($player),'Survivor'),array_contains(pgroup($player),'student'),array_contains(pgroup($player),'Default'))){
- die(color(c),'You cannot do this')
- }
- } else if(array_contains(pgroup(),'mod')){
- if(nor(array_contains(pgroup($player),'Survivor'),array_contains(pgroup($player),'student'),array_contains(pgroup($player),'Builder'),array_contains(pgroup($player),'Default'))){
- die(color(c),'You cannot do this')
- }
- } else if(or(array_contains(pgroup(),'admin')array_contains(pgroup(),'sadmin'))){
- null
- } else {
- die(color(c),'You cannot do this')
- }
- try(
- for(assign(@i,0),lte(@i,6),inc(@i)){
- if(array_contains(pgroup($player),@ranks[@i])){
- runas(~op,'/pex user'$player 'group remove'@ranks[@i])
- runas(~op,'/pex user'$player 'group add'@ranks[add(@i,1)])
- die()
- }
- }
- , #CATCH
- die(color(c),'This player is not online')
- )
- <<<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement