An example skript where the command should go on cooldown based on how far player is from spawn.
command /example:
cooldown: 0 seconds
cooldown storage: {cooldown::%player's uuid%::example}
trigger:
set {x} to distance between player's location and {spawn}
set {t} to {x} seconds # Convert number to a time??, how do i do this, or is it not possible
set {cooldown::%player's uuid%::example} to {t}
broadcast "Example command executed by %player%"

