Prison /Upgrade Skript.

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

Valentin95

Member
May 16, 2019
2
0
0
46
Category: Skripts;

Suggested name: Upgrade skript;

Spigot/Skript Version: Latest;

What I want:
Hello, I want a /upgrade skript for pickaxe custom enchants. I want it to have GUI that opens when you run the command and I want it to have blocks that when you click to enchant your pickaxe enchant level by one. I want it to have: Efficiency, Fortune, Unbreaking, Explosive, Haste, JackHammer(Like in VanityMC) and MultiDirectional(Like in VanityMC). I want them to cost 5000 coins for each level and the max level to be 5000.

Ideas for commands: /upgrade

Ideas for permissions: prison.upgrade

When I'd like it by:
A week.
 
No cuz I have it 50% done
[doublepost=1558026868,1558026823][/doublepost]
Code:
command /upgrade:
  trigger:
    if player's tool is not a pickaxe:
      message "&cYou must hold a pickaxe!"
      stop
    else:
      open chest with 3 rows named "&6&lEnchants" to player
      format slot 10 of player with stone named "&7Fortune&b (%level of fortune of tool of player%)" to run [execute console command "fortune %player%"]
      format slot 13 of player with stone named "&7Unbreaking&b (%level of unbreaking of tool of player%)" to run [execute console command "unbreaking %player%"]
      format slot 16 of player with stone named "&7Efficiency&b (%level of efficiency of tool of player%)" to run [execute console command "efficiency %player%"]

command /fortune <player>:
 executable by: console
 trigger:
  if {token::balance::%arg-1%} is greater or equal to 5000:
   subtract 5000 from {token::balance::%arg-1%}
   set {Fortune.%arg-1%} to "fortune %level of fortune of tool of arg 1 + 1%"
   enchant arg-1's tool with "%{Fortune.%arg-1%}%" parsed as enchantment type
   message "&a&l(!)&a You have upgraded fortune to &b%{Fortune.%arg-1%}%&a!" to arg 1
  else:
   close inventory of arg 1
   message "&cInsufficient Funds!" to arg 1

command /efficiency <player>:
 executable by: console
 trigger:
  if {token::balance::%arg-1%} is greater or equal to 5000:
   subtract 5000 from {token::balance::%arg-1%}
   set {Efficiency.%arg-1%} to "efficiency %level of efficiency of tool of arg 1 + 1%"
   enchant arg-1's tool with "%{Efficiency.%arg-1%}%" parsed as enchantment type
   message "&a&l(!)&a You have upgraded efficiency to &b%{Efficiency.%arg-1%}%&a!" to arg 1
  else:
   close inventory of arg 1
   message "&cInsufficient Funds!" to arg 1

command /unbreaking <player>:
 executable by: console
 trigger:
  if {token::balance::%arg-1%} is greater or equal to 5000:
   subtract 5000 from {token::balance::%arg-1%}
   set {unbreaking.%arg-1%} to "unbreaking %level of unbreaking of tool of arg 1 + 1%"
   enchant arg-1's tool with "%{unbreaking.%arg-1%}%" parsed as enchantment type
   message "&a&l(!)&a You have upgraded unbreaking to &b%{unbreaking.%arg-1%}%&a!" to arg 1
  else:
   close inventory of arg 1
   message "&cInsufficient Funds!" to arg 1