#Cooldown

1 messages · Page 1 of 1 (latest)

still dove
#
    permission: force.lava
    permission message: &7Insufficient permissions.
    trigger:
        if player's inventory contains lime dye named "&eForce Volcano":
            send action bar "&lYou already possess a Force Volcano." to player
        else:
            give player lime dye named "&eForce Volcano"
            send "&lMay the force be with you." to player

on right click with lime dye:
    if player's tool is lime dye named "&eForce Volcano":
        if player's target entity is a player:
    push clicked player upwards
    apply instant damage 1 to the clicked entity for 0.1 seconds
    while y of clicked player's velocity is more than 0:
        lavaSpout(clicked player)
        wait a ticks

function lavaSpout(player: Player):
    set {_location} to location 0.1 blocks below {_player}
    set {_block} to type of block at {_location}
    if {_block} is not air:
        stop
    make all players see block at {_location} as lava
    wait 0.5 second
    make all players see block at {_location} as {_block}

command /forcewater:
    permission: force.water
    permission message: &7Insufficient permissions.
    trigger:
        if player's inventory contains pink dye named "&eForce WaterSpout":
            send action bar "&lYou already possess a Force WaterSpout." to player
        else:
            give player pink dye named "&eForce WaterSpout"
            send "&lMay the force be with you." to player

on right click with pink dye:
    if player's tool is pink dye named "&eForce WaterSpout":
        if player's target entity is a player:
    push clicked player upwards
    apply instant damage 1 to the clicked entity for 0.1 seconds
    while y of clicked player's velocity is more than 0:
        WaterSpout(clicked player)
        wait a ticks

function WaterSpout(player: Player):
    set {_location} to location 0.1 blocks below {_player}
    set {_block} to type of block at {_location}
    if {_block} is not air:
        stop
    make all players see block at {_location} as water
    wait 0.5 second
    make all players see block at {_location} as {_block}```
#

I know how too do most stuff but Idk how too do cooldowns for when they right click

charred edge
#

There are a bunch of tutorials. Basically set a variable to now, and check the time since that variable.

#
  if time since {cooldown} < 10 minutes:
    send “You havent waited the full 10m!” to player
    stop
  set {cooldown} to now
  #code here```
still dove
charred edge
#

that shouldnt