How to add permissions + give command?

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

JustTijn_

Member
Mar 3, 2017
1
0
0
Hello!

This is my skript and I want to add something (To do:emoji_slight_smile:

code_language.skript:
#Launch, Fireball, Explosion Trail, Lightning
# To do:
# Add command to get the wand
# Add permission to the command
# Add name to the wand when you use the command


on left click:
    player is holding a blaze rod
    {empirewand.effect.%player%} is not set:
        set {empirewand.effect.%player%} to 1
        message "<gold>Empire Wand: <b>Launch"
        stop
    {empirewand.effect.%player%} is 1:
        set {empirewand.effect.%player%} to 2
        message "<gold>Empire Wand: <b>Fireball"
        stop
    {empirewand.effect.%player%} is 2:
        set {empirewand.effect.%player%} to 3
        message "<gold>Empire Wand: <b>Explosion Trail"
        stop
    {empirewand.effect.%player%} is 3:
        set {empirewand.effect.%player%} to 4
        message "<gold>Empire Wand: <b>Lightning"
        stop
    {empirewand.effect.%player%} is 4:
        set {empirewand.effect.%player%} to 1
        message "<gold>Empire Wand: <b>Launch"
        stop

on right click:
    player is holding a blaze rod
    {empirewand.effect.%player%} is 1:
        loop all entities in radius 20 around player:
            push loop-entity upwards at speed 2
            create fake explosion at loop-entity
    {empirewand.effect.%player%} is 2:
        shoot a fireball from the player
    {empirewand.effect.%player%} is 3:
        loop blocks from the block in front of the player to the block 25 in front of the player:
            create explosion of force 2 at loop-block
            wait 1 tick
    {empirewand.effect.%player%} is 4:
        loop all entities in radius 50 around player:
            strike lightning at loop-entity

Thanks for helping :emoji_slight_smile:
 
I hope this helps you out :emoji_slight_smile:

Permission support:
Code:
player has permission "you permission here"

Wand command:
Code:
command /wand:
    trigger:
        player has permission "your permission here"
        give 1 blaze rod named "&6Wand" to the player

Check if player is holding the wand:
Code:
player is holding a blaze rod named "&6Wand"
 
Last edited by a moderator:
  • Like
Reactions: Dylan The Beast
Status
Not open for further replies.