Skip to content

Instantly share code, notes, and snippets.

@mgor
Created February 28, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgor/15743aa5efe5ba03ba45d9d342bc1da6 to your computer and use it in GitHub Desktop.
Save mgor/15743aa5efe5ba03ba45d9d342bc1da6 to your computer and use it in GitHub Desktop.
My son had seen a youtube clip of of someone using a pickaxe to mine 3x3x3...
# Ludwig's special pickaxe
#
# Inspired by:
# https://forums.skunity.com/threads/3x3-mining.4864/#post-18936
#
# Install https://github.com/SkriptLang/Skript/releases
# Place this file in plugins/Skript/scripts
#
# Usage:
# /lp user <user> permission set lpickaxe.use true
# /lpick
#
# Toggle between 3x3x3 and 3x3x1 with right click when holding the pickaxe.
#
# ...mine away!
variables:
{mode.%player%} = "3x3x3"
command ludwigpickaxe:
aliases: lpickaxe, lpa, lpick
permission: lpickaxe.use
permission message: &7&l<< &4&lError&7&l >> &r&cYou do not have the required permission to perform this command
trigger:
give a diamond pickaxe with lore "&5LudwigSpecial" to the player
set {_mode} to "3x3x3"
on rightclick:
if player is holding a diamond pickaxe with lore "&5LudwigSpecial":
if {mode.%player%} is "3x3x3":
set {mode.%player%} to "3x3x1"
else:
set {mode.%player%} to "3x3x3"
message "change mode to: %{mode.%player%}%"
on mine:
if player have permission "lpickaxe.use":
if player is holding a diamond pickaxe with lore "&5LudwigSpecial":
set {_1} to location of event-block
set {_2} to location of event-block
if player's pitch is between -50 and 50:
add 1 to y-coord of {_1}
subtract 1 from y-coord of {_2}
if player's horizontal facing is west or east:
add 1 to z-coord of {_1}
subtract 1 from z-coord of {_2}
if {mode.%player%} is "3x3x3":
if player's horizontal facing is east:
add 2 to x-coord of {_1}
else:
subtract 2 from x-coord of {_1}
loop blocks within {_1} and {_2}:
break loop-block using player's tool
else if player's horizontal facing is north or south:
add 1 to x-coord of {_1}
subtract 1 from x-coord of {_2}
if {mode.%player%} is "3x3x3":
if player's horizontal facing is south:
add 2 to z-coord of {_1}
else:
subtract 2 from z-coord of {_1}
loop blocks within {_1} and {_2}:
break loop-block using player's tool
else:
add 1 to x-coord of {_1}
add 1 to z-coord of {_1}
subtract 1 from x-coord of {_2}
subtract 1 from z-coord of {_2}
if {mode.%player%} is "3x3x3":
if player's pitch is -90:
add 2 to y-coord of {_2}
else:
subtract 2 from y-coord of {_2}
loop blocks within {_1} and {_2}:
break loop-block using player's tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment