SHARE
TWEET

Codelock system :)

a guest Apr 24th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # ############################################################
  2. # # +------------------------------------------------------+ #
  3. # # |                       CODE LOCK                      | #
  4. # # +------------------------------------------------------+ #
  5. # ############################################################
  6.  
  7. on left click on wood door:
  8.     open chest inventory with 4 rows named "&8Wood door (Conteúdo)" to player
  9.     set slot 13 of player' current inventory to slimeball named "&eCode Lock" with lore "&7Clique aqui para selecionar a senha da porta"
  10.     set slot 22 of player' current inventory to 331 named "&eKnock Door" with lore "&7Clique aqui para bater na porta"
  11.    
  12. on inventory click:
  13.     event-inventory != player' inventory:
  14.         name of event-inventory = "&8Wood door (Conteúdo)":
  15.             index of event-slot = 13:
  16.                 event-slot = slimeball:
  17.                     name of event-slot = "&eCode Lock":
  18.                         set {x} to x-coordinate of player location
  19.                         set {y} to y-coordinate of player location
  20.                         set {z} to z-coordinate of player location
  21.                             play raw sound "mob.villager.death" at {x} {y} {z} with pitch 1 volume 20
  22.  
  23. on inventory click:
  24.     event-inventory != player' inventory:
  25.         name of event-inventory = "&8Wood door (Conteúdo)":
  26.             index of event-slot = 13:
  27.                 event-slot = slimeball:
  28.                     name of event-slot = "&eCode Lock":
  29.                         cancel event  
  30.                        
  31. on inventory click:
  32.     event-inventory != player' inventory:
  33.         name of event-inventory = "&8Wood door (Conteúdo)":
  34.             index of event-slot = 13: #clicked slot
  35.                 event-slot = slimeball:
  36.                     name of event-slot = "&eCode Lock":
  37.                         wait 5 tick
  38.                         open chest inventory with 5 rows named "&8Code lock (Selecionar senha)" to player
  39.                         set slot 3 of player' current inventory to 370 named "&8" with lore "&7"
  40.                         set slot 4 of player' current inventory to 370 named "&8" with lore "&7"
  41.                         set slot 5 of player' current inventory to 370 named "&8" with lore "&7"
  42.                         set slot 12 of player' current inventory to 361 named "&87" with lore "&7Clique aqui para selecionar a senha da porta"
  43.                         set slot 13 of player' current inventory to 362 named "&88" with lore "&7Clique aqui para selecionar a senha da porta"
  44.                         set slot 14 of player' current inventory to 353 named "&89" with lore "&7Clique aqui para selecionar a senha da porta"
  45.                         set slot 21 of player' current inventory to 338 named "&84" with lore "&7Clique aqui para selecionar a senha da porta"
  46.                         set slot 22 of player' current inventory to 289 named "&85" with lore "&7Clique aqui para selecionar a senha da porta"
  47.                         set slot 23 of player' current inventory to 344 named "&86" with lore "&7Clique aqui para selecionar a senha da porta"
  48.                         set slot 30 of player' current inventory to 406 named "&81" with lore "&7Clique aqui para selecionar a senha da porta"
  49.                         set slot 31 of player' current inventory to 372 named "&82" with lore "&7Clique aqui para selecionar a senha da porta"
  50.                         set slot 32 of player' current inventory to 296 named "&83" with lore "&7Clique aqui para selecionar a senha da porta"
  51.                         set slot 39 of player' current inventory to 388 named "&81" with lore "&7Clique aqui para selecionar a senha da porta"
  52.                         set slot 40 of player' current inventory to 388 named "&81" with lore "&7Clique aqui para selecionar a senha da porta"
  53.                         set slot 41 of player' current inventory to 334 named "&8Cancelar" with lore "&7Clique aqui para cancelar a senha"
  54.  
  55. on inventory click:
  56.     name of player's current inventory contains "Code Lock"
  57.     cancel event
  58.     name of event-inventory contains "Code Lock"
  59.     if index of clicked slot is 12, 13, 14:
  60.         play raw sound "mob.villager.death" at player with pitch 1 volume 10
  61.    
  62.                        
  63. on inventory click:
  64.     name of player's current inventory contains "Code Lock"
  65.     cancel event
  66.     name of event-inventory contains "Code Lock"
  67.     if index of clicked slot is 12, 13 or 14:
  68.         set {_click} to index of clicked slot - 5
  69.     if index of clicked slot is 21, 22 or 23:
  70.         set {_click} to index of clicked slot - 17
  71.     if index of clicked slot is 30, 31 or 32:
  72.         set {_click} to index of clicked slot - 29
  73.     if index of clicked slot is 41:
  74.         set slot 3, 4, 5 of player's current inventory to ghast tear named "&7---"
  75.         stop
  76.        
  77.     set {_val::1} to nether quartz
  78.     set {_val::2} to nether wart
  79.     set {_val::3} to wheat
  80.     set {_val::4} to reeds
  81.     set {_val::5} to gunpowder
  82.     set {_val::6} to egg
  83.     set {_val::7} to pumpkin seeds
  84.     set {_val::8} to melon seeds
  85.     set {_val::9} to sugar    
  86.     if slot 3 of player's current inventory is a ghast tear:
  87.         set slot 3 of player's current inventory to {_val::%{_click}%} named "&7---"
  88.         stop
  89.     if slot 4 of player's current inventory is a ghast tear:
  90.         set slot 4 of player's current inventory to {_val::%{_click}%} named "&7---"
  91.         stop
  92.     if slot 5 of player's current inventory is a ghast tear:
  93.         set slot 5 of player's current inventory to {_val::%{_click}%} named "&7---"
  94.         stop
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top