Command setting with permissions

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Axii

Member
Jan 25, 2024
1
0
1
Hello guys.

I have no idea how this code works. I have a command /becomechristian
I want people to be able to use it only if they are not in a religion. Like if player is already in a religion like "group.muslim" i dont want this command to be used.
If player has group.muslim, when player uses the /becomechristian command some title must show up and say "Hey you are muslim and you can not be christian!" something like this.

Please help.. ^^



Code:
command /becomechristian:
  trigger:
   if player has permission "group.muslim":
     send title to player "&6error" with subtitle "%player% blabla" for 5 seconds
   else:
     send title to player "&6CONGRATS" with subtitle "%player% ur now a christian!" for 5 seconds
     make console execute "lp user %player% permission set group.christian"
 
code_language.skript:
command /becomechristian: # Hey since when is religion in minecraft
  trigger:
    if {religion::%player's uuid%} isn't set:
      set {religion::%player's uuid%} to "christian"
      # do stuff
      
command unbecomechristian:
  delete {religion::%player's uuid%}