xszydel

make a script for a cobweb axe that after a command will appear in your inventory command: /caxe. it will be a netherite axe that when hitting a player places a cobweb under them

Kodari AI
KodariMay 8 at 12:36 pm 4,109 (v2)

I’ll create a cobweb axe script that gives players a special netherite axe via command that places cobwebs under enemies when hit.

CobwebAxe
A combat utility script that provides a special netherite axe through the /caxe command. When players hit enemies with this enchanted axe, it automatically places a cobweb block beneath the victim, creating a strategic trap effect. Features include permission-based access, custom item naming and lore, and seamless combat integration for PvP servers.

Script created! The cobweb axe script includes:

✓ /caxe command to receive the special axe (permission: cobwebaxe.use) ✓ Custom-named netherite axe with identifying lore ✓ Auto-places cobweb under players when hit ✓ Feedback messages for attacker and victim ✓ Configurable prefix and axe name via options

Installation:

  1. Place cobwebaxe.sk in plugins/Skript/scripts/

  2. Run /sk reload cobwebaxe

  3. Grant permission cobwebaxe.use to desired players/groups

  4. Use /caxe to get the axe

Kodari can make mistakes. Review important code before using.
Files
cobwebaxe.sk
Code
1 38
cobwebaxe.sk
# Cobweb Axe Script
# Author: Generated
# Version: 1.0
# Description: Special netherite axe that places cobwebs under hit players

options:
    prefix: &6[CobwebAxe]&r
    axe-name: &3&lCobweb Axe
    permission: cobwebaxe.use

# Command to give the cobweb axe
command /caxe:
    permission: {@permission}
    permission message: &cYou don't have permission to use this command!
    trigger:
        # Create the special cobweb axe
        give player 1 netherite axe named "{@axe-name}" with lore "&7Hit players to trap them in cobwebs!" and "&8Special Weapon"
        send "{@prefix} &aYou have received the Cobweb Axe!" to player

# Event when player hits another player with the axe
on damage:
    attacker is a player
    victim is a player
    attacker's tool is a netherite axe
    
    # Check if the axe has the special name (identifies it as cobweb axe)
    name of attacker's tool is "{@axe-name}"
    
    # Get the location under the victim
    set {_location} to location of victim
    set y-coordinate of {_location} to y-coordinate of {_location} - 1
    
    # Place cobweb at the victim's feet
    set block at victim's location to cobweb
    
    # Optional: Send feedback messages
    send "{@prefix} &eYou trapped %victim% in a cobweb!" to attacker
    send "{@prefix} &cYou've been trapped in a cobweb!" to victim