Solved I need help with grantrank skript

  • 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!

Status
Not open for further replies.
Sep 23, 2020
11
0
1
hi, i am making a skript for my server to give ranks (they arent all in the list yet)

Code:
command /grant [<offline player>] [<text>]:
    permission: core.grant
    permission message: &cYou cannot access our rank system.
    trigger:
        if arg-1 is not set:
            send "&cPlease specify a player."
        else:
            set {grant.player} to arg-1
            open chest with 1 rows named "&b&lGrant" to player
            wait 2 ticks
            format slot 0 of player with diamond named "Granting: %{grant.player}%" to close
            format slot 2 of player with gray wool named "&7default" with lore "&3&m-----------------------------", "&3Priority: &71", "&3Prefix: &8[&7Default&8]&7name", "&3Visible: &7true", "&3Grantable: &7true", "&3&m-----------------------------" and "&a&lLeft click to grant &fMember &a&lto &7%arg-1%" to close
            format slot 3 of player with lime wool named "&aVIP" with lore "&3&m-----------------------------", "&3Priority: &712", "&3Prefix: &2[&aVIP&2]&aname", "&3Visible: &7true", "&3Grantable: &7true", "&3&m-----------------------------" and "&a&lLeft click to grant &dYouTube &a&lto &7%arg-1%" to close
            format slot 4 of player with pink wool named "&dSIMP" with lore "&3&m-----------------------------", "&3Priority: &714", "&3Prefix: &5[&dSIMP&5]&dname", "&3Visible: &7true", "&3Grantable: &7true", "&3&m-----------------------------" and "&a&lLeft click to grant &dSIMP &a&lto &7%arg-1%" to close


on inventory click:
    if inventory name of player's current inventory is "&b&lGrant":
        name of clicked item is "&7default":
            make console execute command "/lp user {grant.player} parent set default"
            message "&1-------------------------------"
            message "&9Grant: &bDefault rank"
            message "&9Target: {grant.player}&b"
            message "&9Time: &bPermanent"
            message "&1-------------------------------"
            send "&aYou have been granted &2Default&a Rank by &2%executor%&a" to {grant.player}
        name of clicked item is "&aVIP":
            make console execute command "/lp user {grant.player} parent set vip"
            message "&1-------------------------------"
            message "&9Grant: &bVIP rank"
            message "&9Target: {grant.player}&b"
            message "&9Time: &bPermanent"
            message "&1-------------------------------"
            send "&aYou have been granted &2VIP&a Rank by &2%executor%&a" to {grant.player}
        name of clicked item is "&dSIMP":
            make console execute command "/lp user {grant.player} parent set simp"
            message "&1-------------------------------"
            message "&9Grant: &bSIMP rank"
            message "&9Target: {grant.player}&b"
            message "&9Time: &bPermanent"
            message "&1-------------------------------"
            send "&aYou have been granted &2SIMP&a Rank by &2%executor%&a" to {grant.player}

i got no errors but it doesnt set the rank, and not getting the messages
 
I think your making this over complicated I made a system like this with luckperms:
(which is very useful for ranks and permissions!)
Code:
command /grantrank [<offline player>]
  trigger:
    if arg-2 is [rank]:
      open chest with 1 row named "ranks"
      format slot 0 of player with tripwire hook named "[rank]" to close then run [make console execute command "/lp user %player% group add [rank/group]"]
[doublepost=1608538398,1608481457][/doublepost]I realized that there is not arg-2 so just add [<text>]
 
Status
Not open for further replies.