Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = 0
- attack = "false"
- local modem = peripheral.wrap("front")
- local speaker = peripheral.wrap("bottom")
- while true do
- modem.open(6)
- local a,b,c,d,msg = os.pullEvent("modem_message")
- _num = tonumber(msg)
- modem.open(7)
- local a,b,c,d,msg = os.pullEvent("modem_message")
- _attack = tostring(msg)
- if _num ~= num or _attack ~= attack then
- term.clear()
- term.setCursorPos(1,1)
- print("Skulls: ".._num)
- print("Attacking: ".._attack)
- num = _num
- attack = _attack
- elseif _num ~= num then
- speaker.playSound("minecraft:entity.player.levelup")
- elseif _attack ~= attack then
- speaker.playSound("minecraft:entity.player.attack.nodamage")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement