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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
on right click:
name of player's tool is "&5Demon King's Dagger":
if {Cool::%player%} isn't set:
apply strength 2 to player for 2 minutes
add 1 to {Cool::%player%}
every minute:
loop all players:
if {Cool::%loop-player%} isn't 0:
remove 1 from {Cool::%loop-player%}
else:
clear {Cool::%loop-player%}
command /Demon:
permission: Demon.permission
permission message: you dont have permission
description: Give the player Demon King's Dagger
trigger:
give player netherite sword named "&5Demon King's Dagger"
send "&7You have acquired &5Demon King's Dagger"
set {&5Demon King's Dagger.%player%} to 0
on right click:
name of player's tool is "&5Demon King's Dagger":
if {Cool::%player%} isn't set:
apply strength 2 to player for 2 minutes
add 1 to {Cool::%player%}
every minute:
loop all players:
if {Cool::%loop-player%} isn't 0:
remove 1 from {Cool::%loop-player%}
else:
clear {Cool::%loop-player%}
why are you using the name as the indetifier? u can just make a woodeen plank and name it that and it'll work the same as the demon kings dagger, use nbtsActually it does not show errors but the apply strength part just does not work, i made sure the name was the same and everything and even made a command to give me the sword, Luke_Sky_walker Thanks for the help anyways
Code:command /Demon: permission: Demon.permission permission message: you dont have permission description: Give the player Demon King's Dagger trigger: give player netherite sword named "&5Demon King's Dagger" send "&7You have acquired &5Demon King's Dagger" set {&5Demon King's Dagger.%player%} to 0 on right click: name of player's tool is "&5Demon King's Dagger": if {Cool::%player%} isn't set: apply strength 2 to player for 2 minutes add 1 to {Cool::%player%} every minute: loop all players: if {Cool::%loop-player%} isn't 0: remove 1 from {Cool::%loop-player%} else: clear {Cool::%loop-player%}
on load:
set {-sussywussysword} to iron sword named "&5Demon King's Dagger"
function getUnix() :: number:
return unix timestamp of now
on rightclick:
player's tool's name = {-sussywussysword}'s name # 's name Is so you can enchant or smth
set {_cooldown} to getUnix() - {-demoncooldowns::%player's uuid%}
if {_cooldown} >= 60:
send "&cThe ability is on cooldown for less than %{_cooldown}% seconds"
stop
set {-demoncooldowns::%player's uuid%} to getUnix()
# Do ability stuff idk
apply strength 2 to player for 2 minutes
# Remove this command or add permissions. This is to give you the demon dagger sword
command /getsussywussysword:
trigger:
give {-sussywussysword} to player
ok i changed it should use nbtsActually it does not show errors but the apply strength part just does not work, i made sure the name was the same and everything and even made a command to give me the sword, Luke_Sky_walker Thanks for the help anyways
Code:command /Demon: permission: Demon.permission permission message: you dont have permission description: Give the player Demon King's Dagger trigger: give player netherite sword named "&5Demon King's Dagger" send "&7You have acquired &5Demon King's Dagger" set {&5Demon King's Dagger.%player%} to 0 on right click: name of player's tool is "&5Demon King's Dagger": if {Cool::%player%} isn't set: apply strength 2 to player for 2 minutes add 1 to {Cool::%player%} every minute: loop all players: if {Cool::%loop-player%} isn't 0: remove 1 from {Cool::%loop-player%} else: clear {Cool::%loop-player%}
command /Demon:
permission: Demon.permission
permission message: you dont have permission
description: Give the player Demon King's Dagger
trigger:
set {_i} to netherite sword named "&5Demon King's Dagger"
set {_icompound} to nbt compound of {_i}
set tag "demonkingdagger" of {_icompound} to "true"
give player {_i}
send "&7You have acquired &5Demon King's Dagger"
set {&5Demon King's Dagger.%player%} to 0
on right click:
set player's tool to {_ptool}
set {_ptoolcompound} to nbt compound of {_ptool}
set {_ptooltag} to tag "demonkingdagger" of {_ptoolcompound}
{_ptooltag} contains "true":
set {_cooldown1} to difference between {demondaggercooldown::%player's uuid%} and now
if {_cooldown1} is less then 1 minute:
send "&cTry again in %difference between 1 minute and {_cooldown1}%"
else:
set {demondaggercooldown::%player's uuid%} to now
apply strength 2 to player for 8 minutes[CODE]
Btw i didnt test this code, tell me if u need help with errors