Jump to content

if u can may you make this toggleable if its possible


Recommended Posts

on load:
    set {compressingItem} to 1 of glowing mossy stone bricks named "&a&nCompressed Mossy Cobblestone"

command /togglecompress <text>:
    permission: op
        if arg-1 is "on":
            set {compress} to true
        if arg-1 is "off":
            set {compress} to false
            send "&cError, unknown argument" to player

on mine:
    if {compress} is true:
        if player's inventory contains 32 of mossy cobblestone:
            remove 32 of plain mossy cobblestone from player's inventory
            give player {compressingItem}

Perhaps you can try something like this. I haven't tested it, so i don't know if it will work or not. If there are any errors or if it doesn't work, let me know.

Also, creating a variable named {_item} everytime someone mines a block is quite bad for the speed of the server, so instead setting a global variable to whatever you want when the skript is loaded in would be better.

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals

Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...