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

    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.

NeonFox__

Member
Oct 25, 2019
16
0
0
23
Hello! I'm making a granting ranks GUI and I am not too sure how to make a confirmation page. So like when you click a rank it shows a red or green button to confirm. here is a part of the code:
Code:
command /SetRank1 [<offline player>]:
    aliases: /SR1 , /sk1
    permission: system.rank
    permission message: &1SetRank> &7No Permission
    trigger:
        if arg-1 is not set:
            send "&4"
        else:
            open chest with 6 rows named "&cStaff Ranks" to player
            wait 4 tick

            format slot 0 of player with paper named "&3&lBack" to run [make player execute command "grant %arg-1%"]
            format slot 1 of player with red wool named "&4&lOwner Group" with lore "&9Rank players to Owner" to close then run [make player execute command "pex user %arg-1% group set Owner"]
            format slot 2 of player with pink wool named "&c&lManager Group" with lore "&9Rank players to Manager" to close then run [make player execute command "pex user %arg-1% group set Manager"]
            format slot 3 of player with light blue wool named "&bDeveloper" with lore "&9Rank players to Developer." to close then run [make player execute command "pex user %arg-1% group set Developer"]
            format slot 4 of player with purple wool named "&cSR.Admin" with lore "&9Rank players to SR.Admin." to close then run [make player execute command "pex user %arg-1% group set sr.admin"]
            format slot 5 of player with light gray wool named "&cAdmin Group" with lore "&9Rank players to Admin." to close then run [make player execute command "pex user %arg-1% group set Admin"]
            format slot 6 of player with yellow wool named "&eModerator Group" with lore "&9Rank players to Moderator." to close then run [make player execute command "pex user %arg-1% group set Moderator"]
            format slot 7 of player with lime wool named "&2&lHead Builder Group" with lore "&9Rank players to head Builder." to close then run [make player execute command "pex user %arg-1% group set Head-Builder"]
            format slot 8 of player with green wool named "&eBuilder Group" with lore "&9Rank players to Builder." to close then run [make player execute command "pex user %arg-1% group set Builder"]
            format slot 9 of player with lime wool named "&eHelper Group" with lore "&9Rank players to Helper." to close then run [make player execute command "pex user %arg-1% group set helper"]
            format slot 10 of player with white wool named "&eTrainee Group" with lore "&9Rank players to Trainee." to close then run [make player execute command "pex user %arg-1% group set Trainee"]
 
Hello there, the best solulation for this would be for you to change the executing commands in the gui to the group name like this here [make player execute command "/owner"] do that for all your groups then add more guis with for example /owner then when you click owner group it will go into a confirmiation gui.

Hope this helps. :emoji_slight_smile:
 
Last edited:
Hello there, the best solulation for this would be for you to change the executing commands in the gui to the group name like this here [make player execute command "/owner"] do that for all your groups then add more guis with for example /owner then when you click owner group it will go into a confirmiation gui.

Hope this helps. :emoji_slight_smile:

If you do need more help I can give you the entire made up skript.
Ok, thanks! It is gonna be hell skripting it!
[doublepost=1573367402,1573366797][/doublepost]@RunaYoutube How would I make it know who to grant
Code:
command /owner:
    permission: system.rank.owner
    permission message: &1SetRank> &7No Permission
    trigger:
        open chest with 7 rows named "&cConfirmation" to player
        wait 4 tick
      
        format slot 10 of player with green wool named "&a&lConfirm" with lore "&a&lConfirm" to close then run [make player execute command "pex user ? group set Owner"]
 
Last edited:
Ok, thanks! It is gonna be hell skripting it!
[doublepost=1573367402,1573366797][/doublepost]@RunaYoutube How would I make it know who to grant
Code:
command /owner:
    permission: system.rank.owner
    permission message: &1SetRank> &7No Permission
    trigger:
        open chest with 7 rows named "&cConfirmation" to player
        wait 4 tick
     
        format slot 10 of player with green wool named "&a&lConfirm" with lore "&a&lConfirm" to close then run [make player execute command "pex user ? group set Owner"]

do format slot 10 of player with green wool named "&a&lConfirm" with lore "&a&lConfirm" to close then run [make player execute command "pex user %arg-1% group set Owner"]
 
Hmmmm, nothing looks to be off with this skript
The only thing I think is off is
Code:
        format slot 10 of player with green wool named "&a&lConfirm" to close then run [make player execute command "pex user %arg-1% group set Owner"]
Because it is format slot 10 of player <----- | but yet again I have tried GUI and chest to replace player but it does not work...
 
Code:
command /confirmgrant [<player>] [<text>]:
    permission: server.grant
    permission message: &cInsufficient permissions!
    trigger:
        if arg-1 is set:
            if arg-2 is "cancel":
                send "&cGrant has been cancelled." to player
                stop
            else:
                set {_p} to "%arg-1%" parsed as player
                wait 2 ticks
                open chest with 5 rows named "&8Confirm your grant" to player
                format slot 10 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 11 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 12 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 19 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 20 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 21 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 22 of the player with skull of {_p} named "&6&l%arg-1%" with lore "&fYou currently selected this user." to be unstealable
                format slot 28 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 29 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 30 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 14 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 15 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 16 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 23 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 24 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 25 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 32 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 33 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 34 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                stop
Give this a try? Maybe next time include your server's version, addons you use, Skript version you are using, etc.
 
Code:
command /confirmgrant [<player>] [<text>]:
    permission: server.grant
    permission message: &cInsufficient permissions!
    trigger:
        if arg-1 is set:
            if arg-2 is "cancel":
                send "&cGrant has been cancelled." to player
                stop
            else:
                set {_p} to "%arg-1%" parsed as player
                wait 2 ticks
                open chest with 5 rows named "&8Confirm your grant" to player
                format slot 10 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 11 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 12 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 19 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 20 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 21 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 22 of the player with skull of {_p} named "&6&l%arg-1%" with lore "&fYou currently selected this user." to be unstealable
                format slot 28 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 29 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 30 of the player with green wool named "&a&lConfirm" with lore "&fClick to confirm grant." to close then run [execute player command "pex user %arg-1% group set %arg-2%"]
                format slot 14 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 15 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 16 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 23 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 24 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 25 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 32 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 33 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                format slot 34 of the player with red wool named "&c&lCancel" with lore "&fClick to cancel grant." to close then run [execute player command "confirmgrant %arg-1% cancel"]
                stop
Give this a try? Maybe next time include your server's version, addons you use, Skript version you are using, etc.
Does not work, the code has no errors but this keeps happening: (my version is 1.14.4 and im on minehut)
https://gyazo.com/bdb753996de48ed35807ae8e45c71ab5
 
Oh, sorry. I meant like in-game. /confirmgrant <your in-game name> Owner.
 
Oh, sorry. I meant like in-game. /confirmgrant <your in-game name> Owner.
Yes, that works but any admin can give themself owner if I give them permission to that command, that's why I need a GUI like so when they click it it closes and says "&cNO PERMISSION" It will be weird if you do "/divine (player)" for a rank
 
Status
Not open for further replies.