.evourai

Can you create me a skript that so if someone tries to break light blue concrete,prismarine,prismarine bricks,tuff bricks,chiseled tuff bricks, deepslate brick slab, deepslate brick stairs,cobblestone,polished diorite,smooth stone,deepslate,polished tuff wall,lodestone,basalt,polished andesite,diorite,deepslate bricks,mossy stone bricks,mossy cobblestone,white banner,polished tuff,polished tuff stairs,tuff,stone brick stairs,cyan terracotta,gravel,iron bars,andesite,lever,andesite wall,stone brick wall,cracked stone bricks,andesite stairs,lantern and a tuff brick slab and only operators can break those blocks

Kodari AI
KodariMay 28 at 2:47 pm 6

I’ll create a block protection system that only allows operators to break specific blocks.

OpBlockProtection
A server protection Skript that restricts breaking of specific building and structural blocks to operators only. Protects 35+ block types including concrete, prismarine variants, tuff blocks, stone variants, and decorative items. When non-operators attempt to break protected blocks, the action is cancelled with a clear permission message. Ideal for spawn areas, builds, and protected zones where only staff should modify terrain.

Installation Instructions:

  1. Place the file in plugins/Skript/scripts/

  2. Reload with /sk reload op-block-protection

  3. Test by having a non-op player try to break a protected block

How it works:

  • ✓ Operators can break any protected block normally

  • ✗ Non-operators cannot break any of the 35 protected block types

  • Players get a clear message when denied

To customize:

  • Change the permission-message in options at the top

  • Add/remove block types in the if event-block is... line

  • You can also add a permission node instead of op-only if needed (let me know if you want that!)

.evourai

add all of those blocks

Kodari can make mistakes. Review important code before using.
Files
op-block-protection.sk
Code
1 24
op-block-protection.sk
# Op Block Protection
# Author: Generated by Kodari
# Version: 1.0
# Description: Prevents non-operators from breaking specific protected blocks

options:
    prefix: &c[Protection]&r
    permission-message: &cYou don't have permission to break this block! Only operators can break protected blocks.

# Event triggered when any player breaks a block
on break:
    # Check if the broken block is one of the protected types
    if event-block is light blue concrete, prismarine, prismarine bricks, tuff bricks, chiseled tuff bricks, deepslate brick slab, deepslate brick stairs, cobblestone, polished diorite, smooth stone, deepslate, polished tuff wall, lodestone, basalt, polished andesite, diorite, deepslate bricks, mossy stone bricks, mossy cobblestone, white banner, polished tuff, polished tuff stairs, tuff, stone brick stairs, cyan terracotta, gravel, iron bars, andesite, lever, andesite wall, stone brick wall, cracked stone bricks, andesite stairs, lantern or tuff brick slab:
        # Check if the player is NOT an operator
        if player is not op:
            # Cancel the block break event
            cancel event
            # Send denial message to the player
            send "{@prefix} {@permission-message}" to player

# Confirmation message when script loads
on script load:
    send "{@prefix} &aOp Block Protection loaded successfully!" to console
    send "{@prefix} &7Protecting 35 block types from non-operators" to console