daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Mar 26th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. num = 0
  2. attack = "false"
  3. local modem = peripheral.wrap("front")
  4. local speaker = peripheral.wrap("bottom")
  5.  
  6. while true do
  7.    
  8.     modem.open(6)
  9.     local a,b,c,d,msg = os.pullEvent("modem_message")
  10.     _num = tonumber(msg)
  11.    
  12.     modem.open(7)
  13.     local a,b,c,d,msg = os.pullEvent("modem_message")
  14.     _attack = tostring(msg)
  15.    
  16.     if _num ~= num or _attack ~= attack then
  17.        
  18.         term.clear()
  19.         term.setCursorPos(1,1)
  20.        
  21.         print("Skulls: ".._num)
  22.         print("Attacking: ".._attack)
  23.        
  24.         num = _num
  25.         attack = _attack
  26.    
  27.     elseif _num ~= num then
  28.         speaker.playSound("minecraft:entity.player.levelup")
  29.        
  30.     elseif _attack ~= attack then
  31.         speaker.playSound("minecraft:entity.player.attack.nodamage")
  32.        
  33.     end
  34.    
  35. end
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