No chat to show

This project's files are all here to explore.

Files
clown-watches.sk
Code
1 134
clown-watches.sk
# Clown Watches
# Place this file in plugins/Skript/scripts/
# Reload with: /sk reload clown-watches

options:
    prefix: &8[&6Clown Watches&8]
    cooldown: 30 seconds

command /givewatch <text> [<player>]:
    permission: watches.admin
    permission message: &cYou do not have permission to use this command.
    trigger:
        if arg-2 is set:
            set {_target} to arg-2
        else:
            set {_target} to player

        if arg-1 is "ignis":
            give 1 clock named "&c&lIgnis Watch" with lore "&7Right-Click: Fireball Burst" to {_target}
            send "{@prefix} &aGave an Ignis Watch to %{_target}%."
        else if arg-1 is "zephyr":
            give 1 clock named "&b&lZephyr Watch" with lore "&7Right-Click: Air Pushback" to {_target}
            send "{@prefix} &aGave a Zephyr Watch to %{_target}%."
        else if arg-1 is "vector":
            give 1 clock named "&e&lVector Watch" with lore "&7Right-Click: Hyper Speed" to {_target}
            send "{@prefix} &aGave a Vector Watch to %{_target}%."
        else if arg-1 is "aero":
            give 1 clock named "&a&lAero Watch" with lore "&7Right-Click: Float & Levitate" to {_target}
            send "{@prefix} &aGave an Aero Watch to %{_target}%."
        else if arg-1 is "terra":
            give 1 clock named "&6&lTerra Watch" with lore "&7Right-Click: Ground Quake" to {_target}
            send "{@prefix} &aGave a Terra Watch to %{_target}%."
        else if arg-1 is "shadow":
            give 1 clock named "&8&lShadow Watch" with lore "&7Right-Click: Invisibility" to {_target}
            send "{@prefix} &aGave a Shadow Watch to %{_target}%."
        else if arg-1 is "glacier":
            give 1 clock named "&3&lGlacier Watch" with lore "&7Right-Click: Ice Trap" to {_target}
            send "{@prefix} &aGave a Glacier Watch to %{_target}%."
        else if arg-1 is "volt":
            give 1 clock named "&e&lVolt Watch" with lore "&7Right-Click: Lightning Strike" to {_target}
            send "{@prefix} &aGave a Volt Watch to %{_target}%."
        else:
            send "&cUsage: /givewatch <ignis|zephyr|vector|aero|terra|shadow|glacier|volt> [player]"

on right click holding a clock:
    if name of player's tool contains "Ignis Watch":
        cancel event
        if {watch.cooldown::ignis::%player's uuid%} is set:
            if difference between now and {watch.cooldown::ignis::%player's uuid%} is less than {@cooldown}:
                send "&cIgnis Watch is still on cooldown." to player
                stop
        set {watch.cooldown::ignis::%player's uuid%} to now
        make player shoot fireball at speed 1.5
        apply fire resistance 1 to player for 10 seconds
        send "&c&lIgnis Watch &7activated!" to player

    else if name of player's tool contains "Zephyr Watch":
        cancel event
        if {watch.cooldown::zephyr::%player's uuid%} is set:
            if difference between now and {watch.cooldown::zephyr::%player's uuid%} is less than {@cooldown}:
                send "&cZephyr Watch is still on cooldown." to player
                stop
        set {watch.cooldown::zephyr::%player's uuid%} to now
        push all entities in radius 5 of player away from player at speed 2.5
        send "&b&lZephyr Watch &7activated!" to player

    else if name of player's tool contains "Vector Watch":
        cancel event
        if {watch.cooldown::vector::%player's uuid%} is set:
            if difference between now and {watch.cooldown::vector::%player's uuid%} is less than {@cooldown}:
                send "&cVector Watch is still on cooldown." to player
                stop
        set {watch.cooldown::vector::%player's uuid%} to now
        apply speed 3 to player for 8 seconds
        apply haste 2 to player for 8 seconds
        send "&e&lVector Watch &7activated!" to player

    else if name of player's tool contains "Aero Watch":
        cancel event
        if {watch.cooldown::aero::%player's uuid%} is set:
            if difference between now and {watch.cooldown::aero::%player's uuid%} is less than {@cooldown}:
                send "&cAero Watch is still on cooldown." to player
                stop
        set {watch.cooldown::aero::%player's uuid%} to now
        apply levitation 2 to player for 6 seconds
        send "&a&lAero Watch &7activated!" to player

    else if name of player's tool contains "Terra Watch":
        cancel event
        if {watch.cooldown::terra::%player's uuid%} is set:
            if difference between now and {watch.cooldown::terra::%player's uuid%} is less than {@cooldown}:
                send "&cTerra Watch is still on cooldown." to player
                stop
        set {watch.cooldown::terra::%player's uuid%} to now
        apply resistance 3 to player for 10 seconds
        loop entities in radius 6 of player:
            if loop-entity is not player:
                if loop-entity is a living entity:
                    apply slowness 2 to loop-entity for 5 seconds
        send "&6&lTerra Watch &7activated!" to player

    else if name of player's tool contains "Shadow Watch":
        cancel event
        if {watch.cooldown::shadow::%player's uuid%} is set:
            if difference between now and {watch.cooldown::shadow::%player's uuid%} is less than {@cooldown}:
                send "&cShadow Watch is still on cooldown." to player
                stop
        set {watch.cooldown::shadow::%player's uuid%} to now
        apply invisibility 1 to player for 8 seconds
        send "&8&lShadow Watch &7activated!" to player

    else if name of player's tool contains "Glacier Watch":
        cancel event
        if {watch.cooldown::glacier::%player's uuid%} is set:
            if difference between now and {watch.cooldown::glacier::%player's uuid%} is less than {@cooldown}:
                send "&cGlacier Watch is still on cooldown." to player
                stop
        set {watch.cooldown::glacier::%player's uuid%} to now
        loop entities in radius 4 of player:
            if loop-entity is not player:
                if loop-entity is a living entity:
                    set block at location of loop-entity to ice
                    apply slowness 10 to loop-entity for 5 seconds
        send "&3&lGlacier Watch &7activated!" to player

    else if name of player's tool contains "Volt Watch":
        cancel event
        if {watch.cooldown::volt::%player's uuid%} is set:
            if difference between now and {watch.cooldown::volt::%player's uuid%} is less than {@cooldown}:
                send "&cVolt Watch is still on cooldown." to player
                stop
        set {watch.cooldown::volt::%player's uuid%} to now
        strike lightning at targeted block of player
        send "&e&lVolt Watch &7activated!" to player