Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # READ!
- #
- #
- # For usage of each command, just type the command.
- #
- #
- # This is a VERY EARLY DEV VERSION!
- # Any issues NEED to be reported!
- #
- # v1.2
- options:
- default group: ENTER-HERE # Please enter in your default group name.
- chat format: "[PREFIX] [PLAYER]: [MESSAGE]"
- P: &c[skPerm]&7
- on script load:
- broadcast ""
- broadcast "{@P} RELOADED - Please read &n/skperm&7 before continuing!"
- broadcast ""
- set {_DF} to "{@default group}"
- if {_DF} is "ENTER-HERE":
- broadcast "{@P} &e&lWARNING &7It is important to setup a default group, and configure it in the script config!"
- broadcast ""
- on join:
- if "{@default group}" is not "ENTER-HERE":
- if {skPerm::user-group::%player's uuid%} is not set:
- console command "/setgroup %player% {@default group}"
- on command:
- if player is not op:
- if {skPerm::user-group::%player's uuid%} is set:
- if {skPerm::group::%{skPerm::user-group::%player's uuid%}%::*} contains command:
- stop
- else:
- cancel event
- send "{@P} Insufficent permissions..."
- else:
- if {skPerm::user::%player's uuid%::*} contains command:
- stop
- else:
- cancel event
- send "{@P} Insufficent permissions..."
- on chat:
- set {_F} to {@chat format}
- if {skPerm::user-group::%player's uuid%} is set:
- if {skPerm::group-prefix::%{skPerm::user-group::%player's uuid%}%} is set:
- replace all "[PREFIX]" with "[%{skPerm::group-prefix::%{skPerm::user-group::%player's uuid%}%}%&f]" in {_F}
- else:
- replace all "[PREFIX]" with "" in {_F}
- else if {skPerm::user-prefix::%player's uuid%} is set:
- replace all "[PREFIX]" with "[%{skPerm::user-prefix::%player's uuid%}%&f]" in {_F}
- else if {skPerm::user-prefix::%player's uuid%} is not set:
- replace all "[PREFIX]" with "" in {_F}
- replace all "[PLAYER]" with "%player%" in {_F}
- replace all "[MESSAGE]" with "%message%" in {_F}
- cancel event
- broadcast "%{_F}%"
- command /skperm:
- trigger:
- send ""
- send "{@P} &lHELP PAGE"
- send "&c> &7/skperm &7- Show this page"
- send "&c> &7/creategroup &7- Create a group"
- send "&c> &7/addcommand &7- Add a command to a player/group"
- send "&c> &7/removecommand &7- Remove a command from a player/group"
- send "&c> &7/delgroup &7- Delete a group"
- send "&c> &7/setgroup &7- Set a player's group"
- send "&c> &7/setprefix &7- Set a players/groups prefix"
- send "{@P} &lTHINGS TO NOTE"
- send "&c> &7Groups are higher up in the inheretince list, with commands and prefixes."
- send "&c> &7Eg if player has command ""/help"", but the group they are in doesn't, it will not work."
- send "&c> &7Operators can access all commands."
- send ""
- command /addcommand [<text>] [<text>] [<text>]:
- trigger:
- if arg-1 is "player":
- if arg-2 is set:
- if arg-3 is set:
- set {_P} to arg-2 parsed as player
- set {_U} to {_P}'s uuid
- add arg-3 to {skPerm::user::%{_U}%::*}
- send "{@P} User &3%{_P}%&7 can now use the command &3%arg-3%&7."
- else:
- send ""
- send "{@P} /addcommand [""player""] [player] [command]"
- send ""
- else:
- send ""
- send "{@P} /addcommand [""player""] [player] [command]"
- send ""
- else if arg-1 is "group":
- if arg-2 is set:
- if arg-3 is set:
- if {skPerm::group::%arg-2%} is set:
- add arg-3 to {skPerm::group::%arg-2%::*}
- send "{@P} Group &3%arg-2%&7 can now use the command &3%arg-3%&7."
- else:
- send "{@P} Group &3%arg-3%&7 cannot be found."
- else:
- send ""
- send "{@P} /addcommand [""group""] [group] [command]"
- send ""
- else:
- send ""
- send "{@P} /addcommand [""group""] [group] [command]"
- send ""
- else:
- send ""
- send "{@P} /addcommand [""player""|""group""] [player|group] [command]"
- send "&c> &7eg /addcommand player 1c7 help"
- send "&c> &7eg /addcommand group admin ban"
- send ""
- command /removecommand [<text>] [<text>] [<text>]:
- trigger:
- if arg-1 is "player":
- if arg-2 is set:
- if arg-3 is set:
- set {_P} to arg-2 parsed as player
- set {_U} to {_P}'s uuid
- remove arg-3 from {skPerm::user::%{_U}%::*}
- send "{@P} User &3%{_P}%&7 can no longer use the command &3%arg-3%&7."
- else:
- send ""
- send "{@P} /removecommand [""player""] [player] [command]"
- send ""
- else:
- send ""
- send "{@P} /removecommand [""player""] [player] [command]"
- send ""
- else if arg-1 is "group":
- if arg-2 is set:
- if arg-3 is set:
- if {skPerm::group::%arg-2%} is set:
- remove arg-3 from {skPerm::group::%arg-2%::*}
- send "{@P} Group &3%arg-2%&7 can no longer use the command &3%arg-3%&7."
- else:
- send "{@P} Group &3%arg-3%&7 cannot be found."
- else:
- send ""
- send "{@P} /removecommand [""group""] [group] [command]"
- send ""
- else:
- send ""
- send "{@P} /removecommand [""group""] [group] [command]"
- send ""
- else:
- send ""
- send "{@P} /removecommand [""player""|""group""] [player|group] [command]"
- send "&c> &7eg /removecommand player 1c7 help"
- send "&c> &7eg /removecommand group admin ban"
- send ""
- command /creategroup [<text>]:
- trigger:
- if arg-1 is set:
- if {skPerm::group::%arg-1%} is not set:
- set {skPerm::group::%arg-1%} to true
- set {skPerm::group-prefix::%arg-1%} to arg-1
- send "{@P} Group &3%arg-1%&7 has been created."
- else:
- send "{@P} This group has already been created. Use &3/deletegroup %arg-1%&7 or &3/addcommand&7."
- else:
- send ""
- send "{@P} /creategroup [group]"
- send "&c> &7eg /creategroup admin"
- send ""
- command /delgroup [<text>]:
- trigger:
- if arg-1 is set:
- if {skPerm::group::%arg-1%} is set:
- loop {skPerm::user-group::*}:
- if loop-value is arg-1:
- delete {skPerm::user-group::%loop-index%}
- delete {skPerm::group::%arg-1%}
- send "{@P} Group &3%arg-1%&7 has been deleted, and all members have been removed."
- else:
- send "{@P} This group does not exist. Use &3/creategroup %arg-1%&7 or &3/addcommand&7."
- else:
- send ""
- send "{@P} /delgroup [group]"
- send "&c> &7eg /delgroup admin"
- send ""
- command /setgroup [<player>] [<text>]:
- trigger:
- if arg-1 is set:
- if arg-2 is set:
- if {skPerm::group::%arg-2%} is set:
- set {skPerm::user-group::%arg-1's uuid%} to arg-2
- send "{@P} &3%arg-1%&7's group has been set to &3%arg-2%&7."
- else:
- send "{@P} This group doesn't exist. Use &3/creategroup &3%arg-2%&7."
- else:
- send "{@P} /setgroup [player] [group]"
- else:
- send ""
- send "{@P} /setgroup [player] [group]"
- send "&c> &7eg /setgroup 1c7 admin"
- send ""
- command /setprefix [<text>] [<text>] [<text>]:
- trigger:
- if arg-1 is "player":
- if arg-2 is set:
- if arg-3 is set:
- set {_P} to arg-2 parsed as player
- set {_U} to {_P}'s uuid
- set {skPerm::user-prefix::%{_U}%} to coloured arg-3
- send "{@P} Player &3%arg-2%&7's prefix has been set to &3%arg-3%&7 [including colours]."
- else:
- send "{@P} /setprefix [""player""] [player] [prefix]"
- else:
- send "{@P} /setprefix [""player""] [player] [prefix]"
- else if arg-1 is "group":
- if arg-2 is set:
- if arg-3 is set:
- if {skPerm::group::%arg-2%} is set:
- set {skPerm::group-prefix::%arg-2%} to coloured arg-3
- send "{@P} Group &3%arg-2%&7's prefix has been set to &3%arg-3%&7 [including colours]."
- else:
- send "{@P} This group doesn't exist. Use &3/creategroup &3%arg-2%&7."
- else:
- send "{@P} /setprefix [""player""] [player] [prefix]"
- else:
- send "{@P} /setprefix [""player""] [player] [prefix]"
- else:
- send ""
- send "{@P} /setprefix [""player""|""group""] [player|group] [prefix]"
- send "&c> &7eg /setprefix player 1c7 coolPlayer"
- send "&c> &7eg /setprefix group admin coolGroup"
- send ""
- command /delprefix [<text>] [<text>]:
- trigger:
- if arg-1 is "player":
- if arg-2 is set:
- set {_P} to arg-1 parsed as player
- set {_U} to {_P}'s uuid
- delete {skPerm::user-prefix::%{_U}%}
- send "{@P} &3%arg-2%&7's prefix has been reset."
- else:
- send "{@P} /delprefix [""player""] [player]"
- else if arg-1 is "group":
- if arg-2 is set:
- delete {skPerm::group-prefix::%arg-2%}
- send "{@P} &3%arg-2%&7's prefix has been reset."
- else:
- send "{@P} /delprefix [""group""] [player]"
- else:
- send ""
- send "{@P} /delprefix [""player""|""group""] [player|group]"
- send "&c> &7eg /delprefix player 1c7"
- send "&c> &7eg /delprefix group admin"
- send ""
Advertisement
Add Comment
Please, Sign In to add comment