Custom breaking speed

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

Orangesanta8415

Supporter
Nov 21, 2020
42
0
6
Category: Customised Survival

Suggested name: CustomMining

Spigot/Skript Version: 1.16.4

What I want:
I would like a Skript that copies the custom mining features of Hypixel Skyblock. The player naturally has mining fatigue so that they can't break any blocks in "world". Then when they hold an item with a set name; e.g: "[Lv1] Drill" that is a prismarine shard it will have a custom breaking time and then break the block. If you don't understand what on earth I'm talking about you can reply and I will try and explain it better there

Ideas for commands: None

Ideas for permissions: None

When I'd like it by: Mid-April 2021?
 
Code:
on break:
    player's world = "world":
        player is not an op
        cancel event

on tool change:
    wait 1 tick
    if the player is holding prismarine shard:
        name of tool of player is "[Lv1] Drill"
        apply haste 3 to the player for 100 hours
    if the player is not holding prismarine shard:
        remove haste from the player
 
Code:
on break:
    player's world = "world":
        player is not an op
        cancel event

on tool change:
    wait 1 tick
    if the player is holding prismarine shard:
        name of tool of player is "[Lv1] Drill"
        apply haste 3 to the player for 100 hours
    if the player is not holding prismarine shard:
        remove haste from the player
He doesnt want to have something like this lmao he wants a whole mining system with custom breaking speeds for each items with stuff which are really hard to do and require a lot of math
 
That script literally does what op said on the example.
He meant a system that has a "mining speed" stat and doesnt allow breaking blocks but when you have a certain item and aim at a certain blockyou can break it even with a stick with custom mining speeds like 300 or 200 and i dont know the exchanges also the pickaxes have to mine at a certain speed too so it is a whole system that he wants