Jump to content
  • 0

alr so can someone test dis and tell me if i am dumb or smart :DDD??? prob dumb it my first skript


Question

Posted

so its soppost to make a crate when u put a chest above a iron block and if u do /commonkey u get a key and if u use on the crate it works

options:

  KeyType: TRIPWIRE HOOK#1
  KeyName: "&f&lCommon Key"
  KeyLore: "&7&lRight Click A Common" and "&7&lCrate To Use"


on rightclick on chest:
  if block under event-block is iron block:
    cancel event
    if player is holding {@KeyType} named {@KeyName} with lore {KeyLore}:

      set {_random} to a random integer from 1 to 100
      if {_random} is between 1 and 50
        set {_item1} to coal
      give player 64 of {_item1}  
      if {_random} is between 51 and 80
        set {_item2} to iron ingot
      give player 32 of {_item2}        
      if {_random} is between 81 and 95
        set {_item3} to diamond
      give player 16 of {_item3}  
      if {_random} is between 96 and 100
        set {_item4} to netherite ingot
      give player 8 of {_item4}  
      play sound "BLOCK_CHEST_OPEN" at volume 100 and pitch 0.5 for player
      remove 1 of {@KeyType} named {@KeyName} with lore {KeyLore} from player's inventory


    else:
      send "&f&lYou Do Not Have A Common Key"

command /commonkey:
  permission: op
  trigger: 
    give player 1 {@KeyType} named {@KeyName} with lore {KeyLore}

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...