Jump to content

Need help with Skript


Shadow200705

Recommended Posts

I'm creating a security system for my server, here's the code: 

on load:
  set {lvl1} to yellow stained glass pane named "Level 1 Keycard"
  set {lvl2} to orange stained glass pane named "Level 2 Keycard"
  set {lvl3} to blue stained glass pane named "Level 3 Keycard"
  set {lvl4} to red stained glass pane named "Level 4 Keycard"
  set {lvl5} to black stained glass pane named "Level 5 Keycard"
  set {staff} to paper named "Staff Keycard"
on right click on a oak button:
  if player is holding {lvl1} or {lvl2} or {lvl3} or {lvl4} or {lvl5} or {staff}:
    stop
  else:
    cancel event
    message "&4&lLevel 1 or above Keycard is required. "
on right click on a birch button:
  if player is holding {lvl2} or {lvl3} or {lvl4} or {lvl5} or {staff}:
    stop
  else:
    cancel event
    message "&4&lLevel 2 or above Keycard is required. "
on right click on a spruce button:
  if player is holding {lvl3} or {lvl4} or {lvl5} or {staff}:
    stop
  else:
    cancel event
    message "&4&lLevel 3 or above Keycard is required. "
on right click on a jungle button:
  if player is holding {lvl4} or {lvl5} or {staff}:
    stop
  else:
    cancel event
    message "&4&lLevel 4 or above Keycard is required. "
on right click on a dark oak button:
  if player is holding {lvl5} or {staff}:
    stop
  else:
    cancel event
    message "&4&lLevel 5 or above Keycard is required. "
on right click on a acacia button:
  if player is holding {staff}:
    stop
  else:
    cancel event
    message "&4&lStaff Keycard is required. "

I know it is working but somehow it didn't detect the item in my hand although I'm holding the Staff Keycard

Link to comment
Share on other sites

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