Jump to content

On rightclick chance


ParrotPlay

Recommended Posts

Im trying to create a Magnifying glass that when ever you click on a block with it you have a chance of getting something but it doesnt work pls help me

__________________________________________________________________________

here is the code

_________________________

on right click holding tripwire hook:
  name of player's tool is "&f&lMagnifying glass"
  if difference between now and {%player's uuid%.aresSword.lastUsed} is less than 0.11 seconds:
    message "&cWait 3 seconds before use again!" to player
  else:
    set {%player's uuid%.aresSword.lastUsed} to now
    set {_chance} to a random integer between 1 and 10000
    if {_chance} is between 1 and 50:
    broadcast "hello"
    stop
    if {_chance} is between 51 and 10000:
    broadcast "bye"
    stop

Link to comment
Share on other sites

  • 1 month later...
on right click holding tripwire hook:
  name of player's tool is "&f&lMagnifying glass":
    if difference between now and {%player's uuid%.aresSword.lastUsed} is less than 0.11 seconds:
      message "&cWait 3 seconds before use again!" to player
    else:
      set {%player's uuid%.aresSword.lastUsed} to now
      set {_chance} to a random integer between 1 and 10000
      if {_chance} is between 1 and 50:
        broadcast "hello"
        stop
      if {_chance} is between 51 and 10000:
        broadcast "bye"
        stop

Please use code blocks next time, tell me if this works.

(chat update) Well, I'm on team #RevertTheUpdate, but if you want to vote, please vote on my post here:

 

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...