Advertisement
Guest User

startup

a guest
Dec 6th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function make_boom()
  2.     s = peripheral.find("speaker");
  3.     --s.playSound("entity.generic.explode");
  4.     --os.sleep(3);
  5.     s.playSound("entity.creeper.primed");
  6.     if math.random() > 0.5 then
  7.         os.sleep(0.5);
  8.         s.playSound("entity.creeper.hurt");
  9.         os.sleep(0.5);
  10.         s.playSound("entity.creeper.hurt");
  11.         os.sleep(1.4);
  12.     else
  13.         os.sleep(2.4);
  14.     end
  15.     s.playSound("entity.generic.explode");
  16. end
  17.  
  18. while true do
  19.     os.sleep(20)
  20.     if math.random() < 0.05 then
  21.         make_boom();
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement