Weapon with active commands

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

Luis Miguel

Member
Dec 15, 2021
1
0
1
24
Category:

Suggested name: Items command

Spigot/Skript Version: Cauldron 1.7.10 | Skript 2.1.2

What I want:
Good morning I have 2 ways to do this is to use target for when an entity attacks you and you have an item in your hand with the name of "Sword divine" do command constantly Example

on entity target:
target is a player
if player is holding blaze powder named "&f&lSword Divine":
execute console command "/effect give %player% speed 5"

Another way that I think would be to use an every 1 minute and check if you have the item Example

every second:
loop all players:
if loop all players is holding blaze powder named "&fSword Divine":
execute console command "/effect give loop all players speed 5"

If I ask for help, it is because none of the skripts I made worked: c


Ideas for commands:

Ideas for permissions:

When I'd like it by: A reasonable time
 
why does it have to be a command? (also execute console command causes lag)
Code:
on player move:
  if name of player's held item is "Sword divine":
    apply potion of speed of tier 1 to player for 1 seconds