Send a message to a player after they've broken a specific block for the first time.

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

HK92

Member
Nov 23, 2024
1
0
1
Essentially what I am looking for is that when a player breaks a block such as a stone block for the first time ever since joining the server, they are sent a message, now I want that to occur when they mine their first block and only their first block no subsequent blocks. I haven't used Skript in years so I am essentially a noob when it comes to creating scripts thus far.
 
This should be a request, but I will still help with this. ( I am feeling quite lazy since I just woke up, but this code is less than 10 lines so not a big deal)

You can use an 'on break' event, but since we only need to detect stone blocks, we can do on break of stone:

Next, we make a variable to see if the player has broken their first block or not. We'll make it {broken::%player's uuid%}.

Now we can make it look something like this:

Code:
if {broken::%player's uuid%} is not set:
    broadcast "whatever"
    set {broken::%player's uuid%} to true

and the full code is here:

Code:
on break of stone:
    if {broken::%player's uuid%} is not set:
        broadcast "You just broke your first stone!"
        set {broken::%player's uuid%} to true

I would list syntax but me lazy