Need help with cooldown

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

deprime

Member
Oct 31, 2024
1
0
1
I have this line of code for a gui for my discord server, it sends a message in chat with a link and i want a cooldown on it, how can i get a cooldown after they click the blue concrete powder


command /discordgui:
cooldown: 5 seconds
cooldown message: &fWait %remaining time% to use this command again
trigger:
set metadata tag "DiscordGUI" of player to chest inventory with 3 rows named " &x&2&1&2&1&2&1&l&nᴅ&x&2&1&2&1&2&1&l&nɪ&x&2&1&2&1&2&1&l&nꜱ&x&2&1&2&1&2&1&l&nᴄ&x&2&1&2&1&2&1&l&nᴏ&x&2&1&2&1&2&1&l&nʀ&x&2&1&2&1&2&1&l&nᴅ"
set slot 13 of metadata tag "DiscordGUI" of player to blue concrete powder named "&bDeprimeGens Discord" with lore "&eClick to join!"
open (metadata tag "DiscordGUI" of player) to player
set slot 0 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 1 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 2 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 3 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 4 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 5 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 6 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 7 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 8 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 9 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 10 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 11 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 12 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 14 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 15 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 16 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 17 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 18 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 19 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 20 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 21 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 22 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 23 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 24 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 25 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 26 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player

on inventory click:
if event-inventory = (metadata tag "DiscordGUI" of player):
cancel event
if index of event-slot is 13:
send "&bDiscord Link: <link:https://discord.gg/><tooltip:>&b&nhttps://discord.gg/<reset>"
 
This might help you:
 
I have this line of code for a gui for my discord server, it sends a message in chat with a link and i want a cooldown on it, how can i get a cooldown after they click the blue concrete powder


command /discordgui:
cooldown: 5 seconds
cooldown message: &fWait %remaining time% to use this command again
trigger:
set metadata tag "DiscordGUI" of player to chest inventory with 3 rows named " &x&2&1&2&1&2&1&l&nᴅ&x&2&1&2&1&2&1&l&nɪ&x&2&1&2&1&2&1&l&nꜱ&x&2&1&2&1&2&1&l&nᴄ&x&2&1&2&1&2&1&l&nᴏ&x&2&1&2&1&2&1&l&nʀ&x&2&1&2&1&2&1&l&nᴅ"
set slot 13 of metadata tag "DiscordGUI" of player to blue concrete powder named "&bDeprimeGens Discord" with lore "&eClick to join!"
open (metadata tag "DiscordGUI" of player) to player
set slot 0 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 1 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 2 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 3 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 4 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 5 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 6 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 7 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 8 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 9 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 10 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 11 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 12 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 14 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 15 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 16 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 17 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 18 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 19 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 20 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 21 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 22 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 23 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 24 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 25 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player
set slot 26 of metadata tag "DiscordGUI" of player to black glass pane named "&7"
open (metadata tag "DiscordGUI" of player) to player

on inventory click:
if event-inventory = (metadata tag "DiscordGUI" of player):
cancel event
if index of event-slot is 13:
send "&bDiscord Link: <link:https://discord.gg/><tooltip:>&b&nhttps://discord.gg/<reset>"
THIS CODE IS ACTUALLY ABOUT TO MAKE ME CRY I'M SO SORRY

USE A LOOP USE A LOOP PLEASE I AM BEGGING YOU USE A LOOP FOR THE BLACK GLASS PANES PLEASE USE A LOOP PLEASE USE A LOOP
 
  • Like
Reactions: LeeifMR