Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /maxplayers <text>:
- permission: admin.spleef
- trigger:
- if arg 1 is set:
- set {maxplayers} to arg 1
- send "maxplayers: %arg 1%"
- command /setspawn:
- permission: admin.spleef
- trigger:
- set {spawn} to location of player
- send "spawn set"
- on join:
- player has permission "user.spleef":
- clear player's inventory
- {gamestart} is true:
- make console execute command "/gamemode 3 %player%"
- stop
- teleport player to {spawn}
- make console execute command "/gamemode 0 %player%"
- add 1 to {playersingame}
- add player to {winner}
- set {inwaited.%player%} to true
- broadcast "&a%player% &7has joined (&a%{playersingame}%&7/&a%{maxplayers}%&7)!"
- wait tick
- if {playersingame} = {maxplayers}:
- set {gamestart} to true
- loop all players:
- wait tick
- send "&7The game starts in &a5 &7seconds!" to loop-player
- send "&7The game starts in &a4 &7seconds!" to loop-player
- send "&7The game starts in &a3 &7seconds!" to loop-player
- send "&7The game starts in &a2 &7seconds!" to loop-player
- send "&7The game starts in &a1 &7second!" to loop-player
- set slot 0 of player to diamond shovel of efficiency 5
- set {ingame.%loop-player%} to true
- on death of player:
- victim has permission "user.spleef":
- {ingame.%victim%} is set:
- subtract 1 from {playersingame}
- subtract victim from {winner}
- delete {ingame.%victim%}
- broadcast "&a%victim% &7fell into thew void (&a%{playersingame}%&7/&a%{maxplayers}%&7)!"
- wait tick
- {playersingame} is 1:
- broadcast "&a%{winner}% &7won the game!"
- make console execute command "/worldreload"
- wait 5 seconds
- loop all players:
- wait tick
- kick loop-player due to "&7Re join for the game."
- delete {gamestart}
- on quit:
- player has permission "user.spleef":
- {ingame.%player%} is set:
- subtract 1 from {playersingame}
- subtract player from {winner}
- delete {ingame.%player%}
- broadcast "&a%player% &7has quit (&a%{playersingame}%&7/&a%{maxplayers}%&7)!"
- wait tick
- {playersingame} is 1:
- broadcast "&a%{winner}% &7won the game!"
- make console execute command "/worldreload"
- wait 5 seconds
- loop all players:
- wait tick
- kick loop-player due to "&7Re join for the game."
- delete {gamestart}
- {inwaited.%player%} is set:
- subtract 1 from {playersingame}
- subtract player from {winner}
- delete {ingame.%player%}
- broadcast "&a%player% &7has quit (&a%{playersingame}%&7/&a%{maxplayers}%&7)!"
- wait tick
- on respawn:
- player has permission "user.spleef":
- make console execute command "/gamemode 3 %player%"
- teleport player to {spawn}
- on damage:
- attacker has permission "user.spleef"
- cancel event
- on break:
- player has permission "user.spleef":
- {inwaited.%player%} is set:
- cancel event
- stop
- cancel event
- set block to air
- {ignore::%location of event-block%} is not set:
- add location of block to {game.broken.blocks::*}
- add type of block to {game.broken.type::*}
- set {ignore::%location of event-block%} to true
- command /worldreload:
- permission: admin.spleef
- trigger:
- loop {game.broken.blocks::*}:
- set {_loc} to loop-value
- set block at {_loc} to {game.broken.type::%loop-index%}
- delete {game.broken.blocks::*}
- delete {game.broken.type::*}
- on hunger level change:
- player has permission "user.spleef"
- cancel event
- on player pick up:
- player has permission "user.spleef"
- cancel event
- on drop:
- player has permission "user.spleef"
- cancel event
- on eat:
- player has permission "user.spleef"
- cancel event
- on death:
- clear drops
- on xp spawn:
- cancel event
- at 18:00:
- set time to 7:00
- on weather change to rain or thunder:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment