could someone fix this skript please?

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

HypixelsFox

Member
Mar 26, 2021
14
1
3
18
command /wand:
----trigger:
------player has permission "skript.Wand"
------give blaze rod named "&c&lWand" with lore "&kL<reset>" to player

on right click:
--if name of item is "&c&lWand":
----if {%player%.spellselected} isn't set:
------set {%player%.spellselected} to "fireball"
------send action bar "&aSpell: &afireball" to player
----else if {%player%.spellselected} is "fireball":
------set {%player%.spellselected} to "thunderbolt"
------send action bar "&aSpell: &bthunderbolt" to player
----else if {%player%.spellselected} is "thunderbolt":
------set {%player%.spellselected} to "spark"
------send action bar "&aSpell: &5spark" to player
----else if {%player%.spellselected} is "spark":
------set {%player%.spellselected} to "heal"
------send action bar "&aSpell: &2heal" to player
----else if {%player%.spellselected} is "heal":
------set {%player%.spellselected} to "leap"
------send action bar "&aSpell: &1leap" to player
----else if {%player%.spellselected} is "leap":
------set {%player%.spellselected} to "fireball"
------send action bar "&aSpell: &afireball" to player

on left click:
--if name of item is "&c&lWand":
----cancel event
----if {%player%.spellcooldown} isn't set:
------if {%player%.spellselected} is "fireball":
--------set {%player%.spellcooldown} to 0
--------spawn fireball at location 1 meter above and 2 meters in front of player
--------add "{ExplosionPower:2}" to nbt of last spawned entity
--------push last spawned entity in direction of player with force 5
------else if {%player%.spellselected} is "thunderbolt":
--------if target of player is an entity:
----------set {%player%.spellcooldown} to 0
----------strike lightning at target entity
----------drawDot count 5, particle "cloud", XYZ 0, 0, 0, center {_loc}, visibleRange 32, pulseDelay 0, keepFor 10 ticks
------else:
--------stop
------else if {%player%.spellselected} is "spark":
--------if target of player is an entity:
----------set {%player%.spellcooldown} to 0
----------damage target by 2
----------set {_loc} to the location 1 meter above target
----------drawSphere style 2, particle "redstone", speed 10, RGB 235, 52, 52, center {_loc}, id "%player%.sphere", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
----------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 153, center {_loc}, id "%player%.sphere2", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
----------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 200, center {_loc}, id "%player%.sphere3", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
----------wait 0.5 seconds
----------stopEffect "%player%.sphere"
----------stopEffect "%player%.sphere2"
----------stopEffect "%player%.sphere3"
--------else:
----------stop
------else if {%player%.spellselected} is "heal":
--------set {%player%.spellcooldown} to 0
--------add 3 to player's health
--------set {_loc} to the location 1 meter above player
--------drawSphere style 2, particle "heart", speed 10, RGB 235, 52, 52, center {_loc}, id "%player%.sphere", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------wait 0.5 seconds
--------stopEffect "%player%.sphere"
------else:
--------stop
------SpellCooldown(player)

function SpellCooldown(p: player):
--send action bar "&7⬛⬛⬛" to {_p}
--wait 1 seconds
--send action bar "&2⬛&7⬛⬛" to {_p}
--wait 1 second
--send action bar "&2⬛⬛&7⬛" to {_p}
--wait 1 second
--send action bar "&a⬛⬛⬛" to {_p}
--delete {%{_p}%.spellcooldown}
--wait 1 second
--send action bar "" to {_p}

command sendhelp:
----trigger:
------set {%player%.spellselected} to "fireball"
--------send "help arrived!"
[doublepost=1620735532,1620735498][/doublepost]nothing seems to work even the commands dont work
 
Last edited:
You need to space things out (Imagine the -'s are spaces)

command /wand:
-trigger:
--player has permission "skript.Wand"
--give blaze rod named "&c&lWand" with lore "&kL<reset>" to player