Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function init(event)
- {
- event.block.timers.stop(2);
- event.block.timers.start(2, 300, true);
- event.block.setModel("minecraft:planks");
- }
- function randomGenWhole()
- {
- return Math.floor(Math.random() * 20);
- }
- function randomIntFromInterval(min,max)
- {
- return Math.floor(Math.random()*(max-min+1)+min);
- }
- function timer(event)
- {
- if(event.id == 2)
- {
- var randomNumberGen = randomGenWhole();
- if (randomNumberGen <= 8)
- {
- var selection = randomIntFromInterval(1, 4);
- switch(selection)
- {
- case 1:
- event.block.executeCommand("/execute @a[r=64] ~ ~ ~ playsound CantSeeMe voice @a ~ ~ ~");
- break;
- case 2:
- event.block.executeCommand("/execute @a[r=64] ~ ~ ~ playsound CreepyLaLa voice @a ~ ~ ~");
- break;
- case 3:
- event.block.executeCommand("/execute @a[r=64] ~ ~ ~ playsound CreepyHum voice @a ~ ~ ~");
- break;
- default:
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement