Solved Need Help ASAP, it isnt switching back to diamond stays on sword

  • 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.
Oct 24, 2020
2
0
1
every tick:
loop all players:
set slot 0 of loop-player to {pvptoggleitem.%loop-player%} named "%{pvptogglename.%loop-player%}%" with lore "&r&fRight Click to %{pvptogglelore.%loop-player%}% PvP!"
set slot 1 of loop-player to diamond horse armor named "&r&6&lCosmic Cannon &r&7(Right Click)" with lore "&r&fRight Click to shoot the cosmic cannon!"
set slot 2 of loop-player to torch named "&r&6&lHide Players &r&7(Right Click)" with lore "&r&fRight Click to hide online players!"
set slot 3 of loop-player to air
set slot 4 of loop-player to compass named "&r&6&lSpaceship &r&7(Right Click)" with lore "&r&fTravel to distant planets in the Cosmoverse!"
set slot 5 of loop-player to clock named "&r&6&lI.S.S. Shuttle &r&7(Right Click)" with lore "&r&fTravel between cosmonaut space stations!"
set slot 6 of loop-player to air
set slot 7 of loop-player to book named "&r&6&lforum.echopvp.net &r&7(Right-Click)" with lore "&r&fJoin the official &6&lEcho&f&lPvP &r&fcommunity forums!"
set slot 8 of loop-player to chest named "&r&6&lstore.echopvp.net &r&7(Right-Click)" with lore "&r&fPurchase amazing perks and support the network!"
set slot 9 of loop-player to air
set slot 10 of loop-player to air
set slot 11 of loop-player to air
set slot 12 of loop-player to air
set slot 13 of loop-player to air
set slot 14 of loop-player to air
set slot 15 of loop-player to air
set slot 16 of loop-player to air
set slot 17 of loop-player to air

on rightclick with diamond or diamond sword:
set {waited.%player%} to difference between {timer.%player%.lastused} and now
if {waited.%player%} is less than 5 seconds:
send "&r&cPlease wait %difference between 5 seconds and {waited.%player%}% seconds and try again." to player
else:
if {pvp.%player%} is false:
set {pvp.%player%} to true
set {pvptogglename.%player%} to "&r&6&lDisable PvP &r&7(Right Click)"
set {pvptogglelore.%player%} to "&r&fDisable"
set {pvptoggleitem.%player%} to "diamond sword" parsed as item
wait 1 tick
set {timer.%player%.lastused} to now
else:
set {pvp.%player%} to false
set {pvptogglename.%player%} to "&r&6&lEnable PvP &r&7(Right Click)"
set {pvptogglelore.%player%} to "&r&fEnable"
set {pvptoggleitem.%player%} to "diamond"
wait 1 tick
set {timer.%player%.lastused} to now
[doublepost=1603524384,1603524322][/doublepost]and ik every tick causes lag but my hub has 12 gb ram by itself i think its fine
[doublepost=1603525078][/doublepost]nvm i think i fixed it for now
 
Status
Not open for further replies.