View difference between Paste ID: m20QK7Ee and aYiKBESg
SHOW: | | - or go back to the newest paste.
1-
{
1+
-- https://pastebin.com/raw/aYiKBESg
2
3
function play(s)
4
	local speaker = peripheral.find("speaker")
5
	return speaker.playSound(type(s) == "table" and s[math.random(1,#s)] or s)
6
end
7
8
function rain(duration)
9
	local speaker = peripheral.find("speaker")
10
	local timeout = os.clock() + duration
11
	while os.clock() < duration do
12
		speaker.playSound("weather.rain.above")
13
		sleep(2)
14
	end
15
end
16-
  "weather.rain.above",
16+
17
sfx = {}
18
sfx.fun = {
19
  "entity.cow.death",
20
  "block.chest.open",
21
  "block.chest.close",
22
  "block.grass.step",
23
24
}
25
26
sfx.scary = {
27
  "entity.creeper.primed",
28
  "entity.generic.explode",
29
  "entity.ghast.hurt",
30
  "entity.ghast.death",
31
  "entity.hostile.big_fall",
32
  "entity.hostile.small_fall",
33
  "entity.rabbit.attack",
34
  "entity.silverfish.step",
35
  "entity.witch.ambient",
36
  "entity.wither.break_block",
37
  "entity.wither_skeleton.ambient",
38
  "entity.zombie.ambient",
39
}
40
41
sfx.suspect = {
42
  "entity.tnt.primed",
43
  "block.stone.break",
44
  "block.piston.extend",
45
  "block.piston.contract",
46
  "block.lever.click",
47
  "block.dispenser.dispense",
48
  "block.wooden_door.close",
49
  "block.wooden_door.open",
50
}
51
52
--
53
sfx.block ={
54
	chest = {
55
		open = "block.chest.open",
56
		["close"] = "block.chest.close",
57
	},
58
	grass = {step = "block.grass.step"},
59
	stone = {["break"] = "block.stone.break"},
60
	piston = {
61
		extend = "block.piston.extend",
62
		contract = "block.piston.contract",
63
	},
64
	lever = {click = "block.lever.click"},
65
	dispenser = {dispense = "block.dispenser.dispense"},
66
	wooden_door = {
67
		open = "block.wooden_door.open",
68
		["close"] = "block.wooden_door.close",
69
	}
70
}
71
sfx.entity = {
72
	cow = {death = "entity.cow.death"},
73
	creeper = {primed = "entity.creeper.primed"},
74
	generic = {explode = "entity.generic.explode"},
75
	ghast = {
76
		hurt = "entity.ghast.hurt",
77
		death = "entity.ghast.death",
78
	},
79
	hostile = {
80
		big_fall = "entity.hostile.big_fall",
81
		small_fall = "entity.hostile.small_fall",
82
	},
83
	rabbit = { attack = "entity.rabbit.attack" },
84
	silverfish = { step = "entity.silverfish.step"},
85
	witch = {ambient = "entity.witch.ambient"},
86
	wither = { break_block = "entity.wither.break_block"},
87
	wither_skeleton = {ambient = "entity.wither_skeleton.ambient"},
88
	zombie = { ambient = "entity.zombie.ambient"},
89
	tnt = { primed = "entity.tnt.primed"},
90
}