Custom enchants 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 community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Knot

Member
Jun 8, 2022
4
0
1
So i have this custom enchants skript i made and i wonder if there is a way to clean it up and make an enchant that allow you to mine in a 3x3 and a 4x4 "miner 1 for 3x3 and Miner 2 for 4x4" Thank you!

(I am a begginer skripter so i am not good at this stuff)







command /customenchants:
permission: op
permission message: "&c&lHey! &7&lyou cant use this command"
trigger:
set {_gui} to a new chest inventory with 1 row with name "&7&lCustom Enchants"
set slot 0 of {_gui} to nether star with name "&1&lPickaxe &7&lEnchants"
open {_gui} to player
on inventory click:
if name of event-inventory is "&7&lCustom Enchants":
if index of event-slot = 0:
set {_gui} to a new chest inventory with 1 row with name "&1&lPickaxe &7&lEnchants"
set slot 0 of {_gui} to nether star with name "&4&lExplosive"
set slot 1 of {_gui} to nether star with name "&3&lMiner"
open {_gui} to player
on inventory click:
if name of event-inventory is "&1&lPickaxe &7&lEnchants":
if index of event-slot = 0:
set {_gui} to a new chest inventory with 1 row with name "&4&lExplosive &7&lEnchantments"
set slot 0 of {_gui} to nether star with name "&c&lExplosive &7&lI"
set slot 1 of {_gui} to nether star with name "&c&lExplosive &7&lII"
set slot 2 of {_gui} to nether star with name "&c&lExplosive &7&lIII" with lore "&cWARNING &7this is very explosive"
open {_gui} to player
else:
if index of event-slot = 1:
set {_gui} to a new chest inventory with 1 row with name "&3&lMiner &7&lEnchantments"
set slot 0 of {_gui} to nether star with name "&3&lMiner &7&lI"
set slot 1 of {_gui} to nether star with name "&3&lMiner &7&lII"
open {_gui} to player
on inventory click:
if name of event-inventory is "&3&lMiner &7&lEnchantments":
if index of event-slot = 0:
cancel event
send "&c&lHey! &7&lThis has not been coded yet"
else:
if index of event-slot = 1:
cancel event
send "&c&lHey! &7&lThis has not been coded yet"


on inventory click:
if name of event-inventory is "&4&lExplosive &7&lEnchantments":
if index of event-slot = 0:
if held item isn't pickaxe:
cancel event
send "&c&lHey! &7&lYou can't enchant that item with &c&lExplosive &7&lI"
else:
cancel event
set lore of held item to "&c&lExplosive &7&lI"
send "&2&lSuccess! &7&lYou have added the enchant &c&lExplosive &7&lI &7&lto your pickaxe!"
else:
if index of event-slot = 1:
if held item isn't pickaxe:
cancel event
send "&c&lHey! &7&lYou can't enchant that item with &c&lExplosive &7&lII"
else:
cancel event
set lore of held item to "&c&lExplosive &7&lII"
send "&2&lSuccess! &7&lYou have added the enchant &c&lExplosive &7&lII &7&lto your pickaxe!"
else:
if index of event-slot = 2:
if held item isn't pickaxe:
cancel event
send "&c&lHey! &7&lYou can't enchant that item with &c&lExplosive &7&lIII"
else:
cancel event
set lore of held item to "&c&lExplosive &7&lII"
send "&2&lSuccess! &7&lYou have added the enchant &c&lExplosive &7&lIII &7&lto your pickaxe!"
on mine:
if lore of held item is "&c&lExplosive &7&lI":
chance of 10%
apply potion of resistance of tier 10 to player for 0.5 seconds
create explosion of force 5 at event-block
on mine:
if lore of held item is "&c&lExplosive &7&lII":
chance of 10%
apply potion of resistance of tier 10 to player for 0.5 seconds
create explosion of force 10 at event-block

on mine:
if lore of held item is "&c&lExplosive &7&lIII":
chance of 10%
apply potion of resistance of tier 10 to player for 0.5 seconds
create explosion of force 15 at event-block
 
Status
Not open for further replies.