Shadow200705 Posted July 6, 2020 Share Posted July 6, 2020 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 More sharing options...
Satelyte Posted July 9, 2020 Share Posted July 9, 2020 What you could do instead of using variables is. If name is "&4&lLevel 5" or "&4&lLevel 4" for example, it will allow access if it is named that, hopefully this might help. Click here for my Twitch! Satelyte <- IGN Professional Dev/Pogger. Link to comment Share on other sites More sharing options...
Shadow200705 Posted July 10, 2020 Author Share Posted July 10, 2020 THANKS A LOT IT WORKS Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now