w1ds_

rework this skript cuz when i stop the event and someone logs off they keep the slowness effect and also the timer that is supposed to be shown up doesnt work

📎 1 file 3,366 chars
📄
pasted-code-1785956793853.txt
txt 78 lines
▶
# Exhausted modifier
# Place in plugins/Skript/scripts/ and use /sk reload exhausted

options:
    bossbar-id: moneysmp:exhausted

on script load:
    delete {exhausted.seconds}
    delete {exhausted.minutes}
    delete {exhausted.displayseconds}
    loop all players:
        remove slowness from loop-player
    execute console command "bossbar remove {@bossbar-id}"

command /exhausted :
    permission: moneysmp.exhausted
    permission message: "&cYou do not have permission to use this command."
    trigger:
        if arg-1 is "start":
            set {exhausted.seconds} to 3600
            set {exhausted.minutes} to 60
            set {exhausted.displayseconds} to 0

            execute console command "bossbar remove {@bossbar-id}"
            execute console command "bossbar add {@bossbar-id} [Exhausted] | Time Remaining: 60m 00s"
            execute console command "bossbar set {@bossbar-id} color blue"
            execute console command "bossbar set {@bossbar-id} max 3600"
            execute console command "bossbar set {@bossbar-id} value 3600"
            execute console command "bossbar set {@bossbar-id} players @a"
            execute console command "bossbar set {@bossbar-id} visible true"

            loop all players:
                apply slowness 1 to loop-player for 999 days
            send "&d&lExhausted &fhas started for 1 hour." to all players
            stop

        if arg-1 is "stop":
            delete {exhausted.seconds}
            delete {exhausted.minutes}
            delete {exhausted.displayseconds}
            loop all players:
                remove slowness from loop-player
            execute console command "bossbar remove {@bossbar-id}"
            send "&d&lExhausted &fhas been stopped." to all players
            stop

        send "&cUsage: /exhausted " to player

every 1 second:
    if {exhausted.seconds} is set:
        if {exhausted.seconds} > 0:
            remove 1 from {exhausted.seconds}
            if {exhausted.displayseconds} > 0:
                remove 1 from {exhausted.displayseconds}
            else:
                remove 1 from {exhausted.minutes}
                set {exhausted.displayseconds} to 59
            if {exhausted.displayseconds} < 10:
                set {_displayseconds} to "0%{exhausted.displayseconds}%"
            else:
                set {_displayseconds} to "%{exhausted.displayseconds}%"
            execute console command "bossbar set {@bossbar-id} value %{exhausted.seconds}%"
            execute console command "bossbar set {@bossbar-id} name [Exhausted] | Time Remaining: %{exhausted.minutes}%m %{_displayseconds}%s"
            execute console command "bossbar set {@bossbar-id} visible true"
        else:
            delete {exhausted.seconds}
            delete {exhausted.minutes}
            delete {exhausted.displayseconds}
            loop all players:
                remove slowness from loop-player
            execute console command "bossbar remove {@bossbar-id}"
            send "&d&lExhausted &fhas ended." to all players

on join:
    if {exhausted.seconds} is set:
        if {exhausted.seconds} > 0:
            apply slowness 1 to player for 999 days
            execute console command "bossbar set {@bossbar-id} players @a"
Kodari AI
KodariAug 5 at 7:10 pm 1
ExhaustedModifierFix
Reworked Minecraft Skript for the Exhausted modifier event. Fixes the issue where slowness persists after the event stops by tracking affected players in a variable and removing the effect on quit. Also fixes the bossbar timer display by properly formatting seconds with leading zeros and ensuring the countdown updates correctly. Includes start/stop commands, automatic cleanup on script load, and reapplication of slowness and bossbar visibility for players who join mid-event.

Place it in plugins/Skript/scripts/exhausted.sk, then run:

Plain Text
/sk reload exhausted

The effect is now reapplied for only 2 seconds at a time, removed when a player quits, and cleared when they join while the event is inactive. The bossbar name also uses valid JSON so the timer displays and updates correctly.

w1ds_

and shows this error asw[19:08:57 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:58 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:58 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:58 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:59 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:59 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:08:59 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:00 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:00 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:00 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:01 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:01 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:01 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:02 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:02 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:02 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:03 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:03 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:03 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:04 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:04 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:04 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:05 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:05 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:05 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:06 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:06 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:06 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:07 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:07 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:07 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:08 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:08 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:08 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:09 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:09 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:09 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:10 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:10 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:10 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:11 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:11 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:11 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:12 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:12 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:12 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:13 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:13 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:13 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:14 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:14 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:14 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:15 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:15 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:15 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:16 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:16 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:09:16 INFO]: No bossbar exists with the ID 'moneysmp:exhausted'

📎 1 file 1,016 chars
📄
pasted-code-1785956963186.txt
txt 11 lines
▶
[19:09:17 INFO]: [Skript] Reloading exhausted.sk...
[19:09:17 INFO]: Line 24: (exhausted.sk)
[19:09:17 INFO]:     Can't understand this condition/effect: execute console command "bossbar add moneysmp:exhausted {\"text\":\"[Exhausted] | Time Remaining: 60m 00s\"}"
[19:09:17 INFO]:     Line: execute console command "bossbar add {@bossbar-id} {\"text\":\"[Exhausted] | Time Remaining: 60m 00s\"}"
[19:09:17 INFO]:  
[19:09:17 INFO]: Line 71: (exhausted.sk)
[19:09:17 INFO]:     Can't understand this condition/effect: execute console command "bossbar set moneysmp:exhausted name {\"text\":\"[Exhausted] | Time Remaining: %{exhausted.minutes}%m %{_displayseconds}%s\"}"
[19:09:17 INFO]:     Line: execute console command "bossbar set {@bossbar-id} name {\"text\":\"[Exhausted] | Time Remaining: %{exhausted.minutes}%m %{_displayseconds}%s\"}"
[19:09:17 INFO]:  
[19:09:17 INFO]:     Encountered 2 errors while reloading exhausted.sk! (39ms)
[19:09:17 INFO]: No bossbar exists with the ID 'moneysmp:exhausted'
Kodari AI
KodariAug 5 at 7:13 pm 1

The repeated error happened because the JSON bossbar commands failed to parse, so the bossbar was never created while the timer kept trying to update it. This version uses plain bossbar text compatible with execute console command.

After replacing the file:

Plain Text
/sk reload exhausted

If the server prints one No bossbar exists message during reload, that is only from trying to remove an already nonexistent bar. It should not repeat every second.

w1ds_

make all these skripts including exhausted into one name it MoneyEvents.sk

with a command /Moneyevent help to show me all these events commands

rework happy hour make the hero of village 3 effect just as the slowness mechanic in this skript

rework the double gold drop that when u mine a gold ore with silk touch nothing happens but when u mine with fortune or normal pickaxe it doubles the gold drop

make oak leaves skript have a 1 hour timer aswell

add a comand in protectvip skript /vip remove player to make me remove current vips

📎 4 files 12,000 chars
📄
leavesdrop.sk
sk 38 lines
▶
# Oak leaf drop event
# Place this file in plugins/Skript/scripts/
# Reload with: /sk reload leavedrops

options:
    prefix: &6[LeafDrops]&r

on script load:
    delete {leavedrops.active}

command /leavedrops :
    permission: leavedrops.admin
    permission message: &cYou do not have permission to manage leaf drops.
    trigger:
        if arg-1 is "start":
            set {leavedrops.active} to true
            send "{@prefix} &aOak leaf drops have been enabled." to player
            stop

        if arg-1 is "stop":
            set {leavedrops.active} to false
            send "{@prefix} &cOak leaf drops have been disabled." to player
            stop

        send "{@prefix} &eUsage: /leavedrops " to player

on break of oak leaves:
    if {leavedrops.active} is not true:
        stop

    chance of 6%:
        drop 2 golden apples at event-location

    chance of 4%:
        drop 2 diamonds at event-location

    chance of 1%:
        drop 1 netherite scrap at event-location
📄
protectvip.sk
sk 78 lines
▶
# protectvip.sk

options:
    prefix: &6[ProtectVIP]&r

command /vip  []:
    permission: protectvip.admin
    trigger:
        if arg-1 is "set":
            if arg-2 is set:
                add arg-2 to {protectvip.vips::*}
                send "{@prefix} &aAdded %arg-2% as a VIP!" to player
            else:
                send "{@prefix} &cUsage: /vip set " to player
        else if arg-1 is "list":
            send "{@prefix} &eVIP Players:" to player
            loop {protectvip.vips::*}:
                send "&7- &f%loop-value%" to player
        else if arg-1 is "remove":
            if arg-2 is set:
                remove arg-2 from {protectvip.vips::*}
                send "{@prefix} &cRemoved %arg-2% from VIPs!" to player
            else:
                send "{@prefix} &cUsage: /vip remove " to player
        else:
            send "{@prefix} &cUsage: /vip  [player]" to player

command /protectvip :
    permission: protectvip.admin
    trigger:
        if arg-1 is "start":
            if {protectvip.active} is true:
                send "{@prefix} &cEvent is already active!" to player
            else:
                set {protectvip.active} to true
                send "{@prefix} &aProtect VIP event started!" to player
                broadcast "{@prefix} &6The Protect VIP event has started!"
                loop {protectvip.vips::*}:
                    if loop-value is online:
                        broadcast "&e&l%loop-value% &6is a VIP! Protect them!"
        else if arg-1 is "stop":
            if {protectvip.active} is false:
                send "{@prefix} &cEvent is not active!" to player
            else:
                set {protectvip.active} to false
                send "{@prefix} &cProtect VIP event stopped!" to player
                broadcast "{@prefix} &6The Protect VIP event has ended!"
                loop all players:
                    remove resistance from loop-player
                    remove speed from loop-player
                    remove fire resistance from loop-player
                    remove glowing from loop-player
                    set max health of loop-player to 10
                    set health of loop-player to 10
        else:
            send "{@prefix} &cUsage: /protectvip " to player

every 2 seconds:
    if {protectvip.active} is true:
        loop all players:
            if {protectvip.vips::*} contains loop-player:
                set {_p} to loop-player
                apply resistance 1 to {_p} for 5 seconds
                apply speed 2 to {_p} for 5 seconds
                apply fire resistance 1 to {_p} for 5 seconds
                apply glowing 1 to {_p} for 5 seconds
                set max health of {_p} to 20
                if health of {_p} is less than 20:
                    set health of {_p} to 20

on quit:
    if {protectvip.active} is true:
        if {protectvip.vips::*} contains player:
            set max health of player to 10

on join:
    if {protectvip.active} is false:
        set max health of player to 10
📄
happyhour.sk
sk 85 lines
▶
# Happy Hour modifier
# Place in plugins/Skript/scripts/
# Use /happyhour start or /happyhour stop

options:
    bossbar-id: moneysmp:happyhour

on script load:
    delete {happyhour.seconds}
    delete {happyhour.minutes}
    delete {happyhour.displayseconds}
    execute console command "effect clear @a minecraft:hero_of_the_village"
    execute console command "bossbar remove {@bossbar-id}"

command /happyhour :
    permission: moneysmp.happyhour
    permission message: "&cYou do not have permission to use this command."
    trigger:
        if arg-1 is "start":
            set {happyhour.seconds} to 3600
            set {happyhour.minutes} to 60
            set {happyhour.displayseconds} to 0

            execute console command "bossbar remove {@bossbar-id}"
            execute console command "bossbar add {@bossbar-id} Happy Hour - 60:00"
            execute console command "bossbar set {@bossbar-id} color green"
            execute console command "bossbar set {@bossbar-id} max 3600"
            execute console command "bossbar set {@bossbar-id} value 3600"
            execute console command "bossbar set {@bossbar-id} players @a"
            execute console command "bossbar set {@bossbar-id} visible true"
            execute console command "effect give @a minecraft:hero_of_the_village 3 2 true"
            send "&a&lHappy Hour &fhas started for 1 hour." to all players
            stop

        if arg-1 is "stop":
            delete {happyhour.seconds}
            delete {happyhour.minutes}
            delete {happyhour.displayseconds}
            execute console command "effect clear @a minecraft:hero_of_the_village"
            execute console command "bossbar remove {@bossbar-id}"
            send "&c&lHappy Hour &fhas been stopped." to all players
            stop

        send "&cUsage: /happyhour " to player

every 1 second:
    if {happyhour.seconds} is set:
        if {happyhour.seconds} <= 0:
            delete {happyhour.seconds}
            delete {happyhour.minutes}
            delete {happyhour.displayseconds}
            execute console command "effect clear @a minecraft:hero_of_the_village"
            execute console command "bossbar remove {@bossbar-id}"
            send "&a&lHappy Hour &fhas ended." to all players
        else:
            remove 1 from {happyhour.seconds}

            if {happyhour.displayseconds} > 0:
                remove 1 from {happyhour.displayseconds}
            else:
                remove 1 from {happyhour.minutes}
                set {happyhour.displayseconds} to 59

            if {happyhour.displayseconds} < 10:
                set {_displayseconds} to "0%{happyhour.displayseconds}%"
            else:
                set {_displayseconds} to "%{happyhour.displayseconds}%"

            execute console command "bossbar set {@bossbar-id} name Happy Hour - %{happyhour.minutes}%:%{_displayseconds}%"
            execute console command "bossbar set {@bossbar-id} value %{happyhour.seconds}%"
            execute console command "bossbar set {@bossbar-id} players @a"
            execute console command "bossbar set {@bossbar-id} visible true"
            execute console command "effect give @a minecraft:hero_of_the_village 3 2 true"

on break of gold ore or deepslate gold ore:
    if {happyhour.seconds} is set:
        if {happyhour.seconds} > 0:
            drop 1 of raw gold at location of event-block

on join:
    if {happyhour.seconds} is set:
        if {happyhour.seconds} > 0:
            execute console command "effect give %player% minecraft:hero_of_the_village 3 2 true"
            execute console command "bossbar set {@bossbar-id} players @a"
            execute console command "bossbar set {@bossbar-id} visible true"
📄
vulnerable.sk
sk 99 lines
▶
# Vulnerable event
# Place in plugins/Skript/scripts/ and use /sk reload vulnerable

options:
    bossbar-id: moneysmp:vulnerable
    duration-seconds: 3600

on script load:
    delete {vulnerable.seconds}
    delete {vulnerable.minutes}
    delete {vulnerable.displayseconds}
    loop all players:
        set max health of loop-player to 10
        set health of loop-player to 10
    execute console command "bossbar remove {@bossbar-id}"

command /vulnerable :
    permission: moneysmp.vulnerable
    permission message: "&cYou do not have permission to use this command."
    trigger:
        if arg-1 is "start":
            set {vulnerable.seconds} to {@duration-seconds}
            set {vulnerable.minutes} to 60
            set {vulnerable.displayseconds} to 0

            execute console command "bossbar remove {@bossbar-id}"
            execute console command "bossbar add {@bossbar-id} [Vulnerable] | Time Remaining: 60m 00s"
            execute console command "bossbar set {@bossbar-id} color red"
            execute console command "bossbar set {@bossbar-id} style progress"
            execute console command "bossbar set {@bossbar-id} max {@duration-seconds}"
            execute console command "bossbar set {@bossbar-id} value {@duration-seconds}"
            execute console command "bossbar set {@bossbar-id} players @a"
            execute console command "bossbar set {@bossbar-id} visible true"

            loop all players:
                set max health of loop-player to 5
                set health of loop-player to 5

            send "&c&lVulnerable &fhas started for 1 hour." to all players
            stop

        if arg-1 is "stop":
            delete {vulnerable.seconds}
            delete {vulnerable.minutes}
            delete {vulnerable.displayseconds}

            loop all players:
                set max health of loop-player to 10
                set health of loop-player to 10

            execute console command "bossbar remove {@bossbar-id}"
            send "&c&lVulnerable &fhas been stopped." to all players
            stop

        send "&cUsage: /vulnerable " to player

every 1 second:
    if {vulnerable.seconds} is set:
        if {vulnerable.seconds} > 0:
            remove 1 from {vulnerable.seconds}

            if {vulnerable.displayseconds} > 0:
                remove 1 from {vulnerable.displayseconds}
            else:
                remove 1 from {vulnerable.minutes}
                set {vulnerable.displayseconds} to 59

            if {vulnerable.displayseconds} < 10:
                set {_displayseconds} to "0%{vulnerable.displayseconds}%"
            else:
                set {_displayseconds} to "%{vulnerable.displayseconds}%"

            execute console command "bossbar set {@bossbar-id} value %{vulnerable.seconds}%"
            execute console command "bossbar set {@bossbar-id} name [Vulnerable] | Time Remaining: %{vulnerable.minutes}%m %{_displayseconds}%s"
        else:
            delete {vulnerable.seconds}
            delete {vulnerable.minutes}
            delete {vulnerable.displayseconds}

            loop all players:
                set max health of loop-player to 10
                set health of loop-player to 10

            execute console command "bossbar remove {@bossbar-id}"
            send "&c&lVulnerable &fhas ended." to all players

on join:
    if {vulnerable.seconds} is set:
        if {vulnerable.seconds} > 0:
            set max health of player to 5
            set health of player to 5
            execute console command "bossbar set {@bossbar-id} players @a"

on respawn:
    if {vulnerable.seconds} is set:
        if {vulnerable.seconds} > 0:
            wait 1 tick
            set max health of player to 5
            set health of player to 5
Kodari AI
KodariAug 5 at 7:25 pm 2

Replace the old scripts with this single file. Remove or disable the old .sk files first so commands and events do not run twice.

Reload it with:

Plain Text
/sk reload MoneyEvents

Make sure the old exhausted.sk, happyhour.sk, leavesdrop.sk, protectvip.sk, and vulnerable.sk files are removed or moved out of the Skript scripts folder. Otherwise, their commands and timers may run alongside MoneyEvents.sk.

w1ds_

Minecraft@53cd0b57~ > sk reload MoneyEvents.sk [19:27:14 INFO]: [Skript] Reloading MoneyEvents.sk... [19:27:14 INFO]: Line 307: (MoneyEvents.sk) [19:27:14 INFO]: the 2nd argument can't have anything removed from it [19:27:14 INFO]:

Line: remove resistance from arg-2 [19:27:14 INFO]: [19:27:14 INFO]: Line 308: (MoneyEvents.sk) [19:27:14 INFO]: the 2nd argument can't have anything removed from it [19:27:14 INFO]:

Line: remove speed from arg-2 [19:27:14 INFO]: [19:27:14 INFO]: Line 309: (MoneyEvents.sk) [19:27:14 INFO]: the 2nd argument can't have anything removed from it [19:27:14 INFO]:

Line: remove fire resistance from arg-2 [19:27:14 INFO]: [19:27:14 INFO]: Line 310: (MoneyEvents.sk) [19:27:14 INFO]: the 2nd argument can't have anything removed from it [19:27:14 INFO]:

Line: remove glowing from arg-2 [19:27:14 INFO]: [19:27:14 INFO]: Line 171: (MoneyEvents.sk) [19:27:14 INFO]: 'drops' can only be used in the on death event or the on harvest block event [19:27:14 INFO]:

Line: loop drops: [19:27:14 INFO]: [19:27:14 INFO]:

Encountered 5 errors while reloading MoneyEvents.sk! (165ms) [19:27:14 INFO]: Target doesn't have the requested effect [19:27:14 INFO]: No bossbar exists with the ID 'moneysmp:exhausted' [19:27:14 INFO]: No bossbar exists with the ID 'moneysmp:happyhour' [19:27:14 INFO]: No bossbar exists with the ID 'moneysmp:leaves' [19:27:14 INFO]: No bossbar exists with the ID 'moneysmp:vulnerable'

rework happy hour double gold drops to

when u mine deepslate gold ore or gold ore theres a 5% chance they drop 10 golden apples 1% for 1 gold block

exhausted slowness lasts 2 seconds and doesnt loop make it loop

Kodari AI
KodariAug 5 at 7:30 pm 1
  1. Fix the invalid VIP effect-removal and block-drop syntax so MoneyEvents.sk reloads.

  2. Replace Happy Hour’s gold bonus with 5% for 10 golden apples and 1% for 1 gold block on gold/deepslate gold ore, with Silk Touch excluded.

  3. Make Exhausted apply Slowness II for 2 seconds and continuously refresh it while the event is active.

Updated MoneyEvents.sk:

  • Fixed VIP removal effect errors by assigning the online player to a variable first.

  • Removed invalid loop drops syntax.

  • Happy Hour now:

    • Ignores Silk Touch.

    • Gives a 5% chance for 10 golden apples when mining gold ore or deepslate gold ore.

    • Gives a 1% chance for 1 gold block.

  • Exhausted now applies Slowness II for 2 seconds and refreshes it every second while active.

Reload with:

Plain Text
/sk reload MoneyEvents.sk

The “bossbar does not exist” messages during script loading are harmless cleanup warnings.

w1ds_

rework happy hour instead of spamming console with /effect give make it do like exhausted loops the effect but without flooding my chat

the gold drops arent working make it 10% chance to drop 5 golden apples when broken and 2% for 1 gold block

Kodari AI
KodariAug 5 at 7:35 pm 1

Updated MoneyEvents.sk:

  • Happy Hour now reapplies Hero of the Village every second using Skript effects instead of console /effect give commands, preventing console/chat spam.

  • Gold ore and deepslate gold ore now have:

    • 10% chance to drop 5 golden apples

    • 2% chance to drop 1 gold block

  • Silk Touch remains excluded.

  • Effect cleanup now uses Skript directly instead of console commands.

Reload it with:

Plain Text
/sk reload MoneyEvents
Kodari can make mistakes. Review important code before using.
Files
exhausted.sk
MoneyEvents.sk
Code
2 659
MoneyEvents.sk
# MoneyEvents.sk
# Place in plugins/Skript/scripts/
# Reload with: /sk reload MoneyEvents

options:
    exhausted-bossbar: moneysmp:exhausted
    happyhour-bossbar: moneysmp:happyhour
    leaves-bossbar: moneysmp:leaves
    vulnerable-bossbar: moneysmp:vulnerable

on script load:
    delete {exhausted.seconds}
    delete {exhausted.minutes}
    delete {exhausted.displayseconds}

    delete {happyhour.seconds}
    delete {happyhour.minutes}
    delete {happyhour.displayseconds}

    delete {leavedrops.seconds}
    delete {leavedrops.minutes}
    delete {leavedrops.displayseconds}

    delete {vulnerable.seconds}
    delete {vulnerable.minutes}
    delete {vulnerable.displayseconds}

    delete {protectvip.active}

    loop all players:
        remove slowness from loop-player
        execute console command "effect clear %loop-player% minecraft:hero_of_the_village"
        set max health of loop-player to 10
        set health of loop-player to 10

    execute console command "bossbar remove {@exhausted-bossbar}"
    execute console command "bossbar remove {@happyhour-bossbar}"
    execute console command "bossbar remove {@leaves-bossbar}"
    execute console command "bossbar remove {@vulnerable-bossbar}"

command /moneyevent [<text>]:
    permission: moneysmp.events
    permission message: &cYou do not have permission to view the event commands.
    trigger:
        if arg-1 is not set:
            set {_show-help} to true
        else if arg-1 is "help":
            set {_show-help} to true

        if {_show-help} is true:
            send "&8&m----------------------------------------" to player
            send "&6&lMoney Events Commands" to player
            send "&e/exhausted <start|stop> &7- Slowness event" to player
            send "&e/happyhour <start|stop> &7- Hero of the Village and bonus gold drops" to player
            send "&e/leavedrops <start|stop> &7- Oak leaf rewards for 1 hour" to player
            send "&e/vulnerable <start|stop> &7- Reduce maximum health" to player
            send "&e/protectvip <start|stop> &7- Protect VIP event" to player
            send "&e/vip <set|remove|list> [player] &7- Manage VIP players" to player
            send "&8&m----------------------------------------" to player
        else:
            send "&cUsage: /moneyevent help" to player

# EXHAUSTED EVENT

command /exhausted <text>:
    permission: moneysmp.exhausted
    permission message: &cYou do not have permission to use this command.
    trigger:
        if arg-1 is "start":
            if {exhausted.seconds} is set:
                send "&cExhausted is already active." to player
                stop

            set {exhausted.seconds} to 3600
            set {exhausted.minutes} to 60
            set {exhausted.displayseconds} to 0

            execute console command "bossbar remove {@exhausted-bossbar}"
            execute console command "bossbar add {@exhausted-bossbar} Exhausted - Time Remaining: 60m 00s"
            execute console command "bossbar set {@exhausted-bossbar} color blue"
            execute console command "bossbar set {@exhausted-bossbar} style progress"
            execute console command "bossbar set {@exhausted-bossbar} max 3600"
            execute console command "bossbar set {@exhausted-bossbar} value 3600"
            execute console command "bossbar set {@exhausted-bossbar} players @a"
            execute console command "bossbar set {@exhausted-bossbar} visible true"

            loop all players:
                apply slowness 1 to loop-player for 2 seconds

            send "&d&lExhausted &fhas started for 1 hour." to all players
            stop

        if arg-1 is "stop":
            if {exhausted.seconds} is not set:
                send "&cExhausted is not active." to player
                stop

            delete {exhausted.seconds}
            delete {exhausted.minutes}
            delete {exhausted.displayseconds}

            loop all players:
                remove slowness from loop-player

            execute console command "bossbar remove {@exhausted-bossbar}"
            send "&d&lExhausted &fhas been stopped." to all players
            stop

        send "&cUsage: /exhausted <start|stop>" to player

# HAPPY HOUR EVENT
# Hero of the Village III is reapplied every second for three seconds.
# Gold ore has a chance to drop bonus golden apples or a gold block.

command /happyhour <text>:
    permission: moneysmp.happyhour
    permission message: &cYou do not have permission to use this command.
    trigger:
        if arg-1 is "start":
            if {happyhour.seconds} is set:
                send "&cHappy Hour is already active." to player
                stop

            set {happyhour.seconds} to 3600
            set {happyhour.minutes} to 60
            set {happyhour.displayseconds} to 0

            execute console command "bossbar remove {@happyhour-bossbar}"
            execute console command "bossbar add {@happyhour-bossbar} Happy Hour - Time Remaining: 60m 00s"
            execute console command "bossbar set {@happyhour-bossbar} color green"
            execute console command "bossbar set {@happyhour-bossbar} style progress"
            execute console command "bossbar set {@happyhour-bossbar} max 3600"
            execute console command "bossbar set {@happyhour-bossbar} value 3600"
            execute console command "bossbar set {@happyhour-bossbar} players @a"
            execute console command "bossbar set {@happyhour-bossbar} visible true"

            loop all players:
                apply hero of the village 2 to loop-player for 3 seconds

            send "&a&lHappy Hour &fhas started for 1 hour." to all players
            stop

        if arg-1 is "stop":
            if {happyhour.seconds} is not set:
                send "&cHappy Hour is not active." to player
                stop

            delete {happyhour.seconds}
            delete {happyhour.minutes}
            delete {happyhour.displayseconds}

            loop all players:
                remove hero of the village from loop-player

            execute console command "bossbar remove {@happyhour-bossbar}"
            send "&c&lHappy Hour &fhas been stopped." to all players
            stop

        send "&cUsage: /happyhour <start|stop>" to player

on break of gold ore or deepslate gold ore:
    if {happyhour.seconds} is not set:
        stop

    if {happyhour.seconds} <= 0:
        stop

    if player's tool is enchanted with silk touch:
        stop

    chance of 10%:
        drop 5 golden apples at location of event-block

    chance of 2%:
        drop 1 gold block at location of event-block

# OAK LEAF DROPS EVENT

command /leavedrops <text>:
    permission: moneysmp.leavedrops
    permission message: &cYou do not have permission to use this command.
    trigger:
        if arg-1 is "start":
            if {leavedrops.seconds} is set:
                send "&cOak leaf drops are already active." to player
                stop

            set {leavedrops.seconds} to 3600
            set {leavedrops.minutes} to 60
            set {leavedrops.displayseconds} to 0

            execute console command "bossbar remove {@leaves-bossbar}"
            execute console command "bossbar add {@leaves-bossbar} Oak Leaf Drops - Time Remaining: 60m 00s"
            execute console command "bossbar set {@leaves-bossbar} color yellow"
            execute console command "bossbar set {@leaves-bossbar} style progress"
            execute console command "bossbar set {@leaves-bossbar} max 3600"
            execute console command "bossbar set {@leaves-bossbar} value 3600"
            execute console command "bossbar set {@leaves-bossbar} players @a"
            execute console command "bossbar set {@leaves-bossbar} visible true"