Solved Skript | Speed and Jump boost blocks

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

    Now, what are you waiting for? Join the community now!

crownowner

Member
Aug 23, 2023
17
0
1
25
Suggested name: Pads Skript

Spigot/Skript Version: 1.20.1

What I want:

I want a basic skript, where these Speed and Jump Boost blocks can be toggled. The speed block is Magenta Glazed Terracota, and the jump block is Red Glazed Terracota.

If a player steps on the Magenta Glazed Terracota or Red Glazed Terracota when the pads are off, they should recieve no effect. But when the pads are on, I want the speed pads to give the user Speed 1 for 3s, and for the Jump I want it to give Jumpboost 2 for 5 seconds.

Ideas for commands:
/pad toggle (On or off)
/pad status (If its on or off, again if possible.)

Ideas for permissions:
pads.admin
 
Also, If it possible for a block (Red Glazed Terracota or shroomlight) to give slow falling 1 for 5s, and of course hiding the particles.
And still be toggleable, using /pad toggle.
 
ok done here :emoji_slight_smile:
Code:
command /pad <text> [<player>]:
    trigger:
        if arg-1 is "toggle":
            if {pad.%player's uuid%} is "on":
                set {pad.%player's uuid%} to "off"
                send "&4&lSet Your Pad Status to off" to player
            else if {pad.%player's uuid%} is "off":
                set {pad.%player's uuid%} to "on"
                send "&a&lSet Your Pad Status to on" to player
            else if {pad.%player's uuid%} is not set:
                set {pad.%player's uuid%} to "on"
                send "&a&lSet Your Pad Status to on" to player
        else if arg-1 is "status":
            if {pad.%player's uuid%} is not set:
                send "&4&lError: &c&lYour Pad Mode isnt set as it is %{pad.%player's uuid%}%"
            else:
                send "&a&l%{pad.%player's uuid%}%" to player
        else:
            send "&4&lError: &c&lThe Arg %arg-1% is not in my database :\"
        if player has permission "pads.admin":
            if arg-2 is set:
                if {pad.%arg-2's uuid%} is "on":
                    set {pad.%arg-2's uuid%} to "off"
                else if {pad.%arg-2's uuid%} is "off":
                    set {pad.%arg-2's uuid%} to "on"

on step on magenta glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply speed 1 without any particles to player for 3 seconds

on step on red glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply jump boost 2 without any particles to player for 5 seconds
        apply slow falling 1 without any particles to player for 5 seconds

on step on shroomlight:
    if {pad.%player's uuid%} is "on":
        apply slow falling 1 without any particles to player for 5 seconds

on step on magenta glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply speed 1 without any particles to player for 3 seconds

on step on red glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply jump boost 2 without any particles to player for 5 seconds
        apply slow falling 1 without any particles to player for 5 seconds

on step on shroomlight:
    if {pad.%player's uuid%} is "on":
        apply slow falling 1 without any particles to player for 5 seconds
 
Hey, sorry to bother. If the player repeatedly steps on the block, the effect multiplies.
Code:
command /pad <text> [<player>]:
    trigger:
        if arg-1 is "toggle":
            if {pad.%player's uuid%} is "on":
                set {pad.%player's uuid%} to "off"
                send "&4&lSet Your Pad Status to off" to player
            else if {pad.%player's uuid%} is "off":
                set {pad.%player's uuid%} to "on"
                send "&a&lSet Your Pad Status to on" to player
            else if {pad.%player's uuid%} is not set:
                set {pad.%player's uuid%} to "on"
                send "&a&lSet Your Pad Status to on" to player
        else if arg-1 is "status":
            if {pad.%player's uuid%} is not set:
                send "&4&lError: &c&lYour Pad Mode isnt set as it is %{pad.%player's uuid%}%"
            else:
                send "&a&l%{pad.%player's uuid%}%" to player
        else:
            send "&4&lError: &c&lThe Arg %arg-1% is not in my database :\a"
        if player has permission "pads.admin":
            if arg-2 is set:
                if {pad.%arg-2's uuid%} is "on":
                    set {pad.%arg-2's uuid%} to "off"
                else if {pad.%arg-2's uuid%} is "off":
                    set {pad.%arg-2's uuid%} to "on"

on step on magenta glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply speed 1 without any particles to player for 3 seconds

on step on red glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply jump boost 2 without any particles to player for 5 seconds

on step on green glazed terracotta:
    if {pad.%player's uuid%} is "on":
        apply slow falling 1 without any particles to player for 5 seconds