JustPaste.it

# Golden Apple Death
execute if score golden_apple trigger matches 1 run function uhc:golden_apple_death


# Episode Markers
execute if score start ticks matches 2 run scoreboard players add time ticks 1
execute if score ems_10 ems matches 1 run function ems:ems_10
execute if score ems_15 ems matches 1 run function ems:ems_15
execute if score ems_20 ems matches 1 run function ems:ems_20
execute if score ems_25 ems matches 1 run function ems:ems_25
execute if score ems_30 ems matches 1 run function ems:ems_30
execute if score ems_10_on ems matches 1 run function ems:ems_10_on
execute if score ems_15_on ems matches 1 run function ems:ems_15_on
execute if score ems_20_on ems matches 1 run function ems:ems_20_on
execute if score ems_25_on ems matches 1 run function ems:ems_25_on
execute if score ems_30_on ems matches 1 run function ems:ems_30_on

# Dead Players - Spectators
gamerule naturalRegeneration false

# No Extra Stones
execute if score no_extra_stones trigger matches 1 run function uhc:no_extra_stones

# Always Gravel
execute if score always_flint trigger matches 1 run function uhc:always_flint

# World Border Size Display
execute store result score wbSize trigger run worldborder get
scoreboard players enable @a wbDisplay
function uhc:wb_toggle

# No AI
execute if score no_ai trigger matches 1 run function uhc:no_ai

# Ghast Gold
execute if score ghast_gold trigger matches 1 run function uhc:ghast_gold

# Always Trident
execute if score drowned_trident trigger matches 1 run function uhc:drowned_trident

### Info Screen
# World Border
execute store result score WorldBorder info run worldborder get

# Player Info
scoreboard players set AlivePlayers info 0
execute as @a[gamemode=survival] run scoreboard players add AlivePlayers info 1
scoreboard players set DeadPlayers info 0
execute as @a[gamemode=spectator] run scoreboard players add DeadPlayers info 1
# Time Info
scoreboard players add minutes ticks 1
execute if score minutes ticks matches 1200 run scoreboard players add MinutesPlayed info 1
execute if score minutes ticks matches 1200 run scoreboard players set minutes ticks 0

### Winner Title
# Team Member Count
execute store result score aqua teamCheck run team list aqua
execute store result score black teamCheck run team list black
execute store result score blue teamCheck run team list blue
execute store result score dark_aqua teamCheck run team list dark_aqua
execute store result score dark_blue teamCheck run team list dark_blue
execute store result score dark_gray teamCheck run team list dark_gray
execute store result score dark_green teamCheck run team list dark_green
execute store result score dark_purple teamCheck run team list dark_purple
execute store result score dark_red teamCheck run team list dark_red
execute store result score gold teamCheck run team list gold
execute store result score gray teamCheck run team list gray
execute store result score green teamCheck run team list green
execute store result score light_purple teamCheck run team list light_purple
execute store result score red teamCheck run team list red
execute store result score white teamCheck run team list white
execute store result score yellow teamCheck run team list yellow
# Detector
execute if score aqua teamCheck > 0 trigger if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Aqua","color":"aqua"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck > 0 trigger if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Black","color":"black"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck > 0 trigger if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Blue","color":"blue"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck > 0 trigger if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Dark Aqua","color":"dark_aqua"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck > 0 trigger if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Dark Blue","color":"dark_blue"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck > 0 trigger if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Dark Gray","color":"dark_gray"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck > 0 trigger if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Dark Green","color":"dark_green"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck > 0 trigger if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Purple","color":"dark_purple"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck > 0 trigger if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Dark Red","color":"dark_red"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck > 0 trigger if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Gold","color":"gold"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck > 0 trigger if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Gray","color":"gray"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck > 0 trigger if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Green","color":"green"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck > 0 trigger if score red teamCheck matches 0 if score white teamCheck matches 0 run title @a title ["",{"text":"Pink","color":"light_purple"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck > 0 trigger if score white teamCheck matches 0 run title @a title ["",{"text":"Red","color":"red"},{"text":" team wins!","color":"gold"}]
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck > 0 trigger run title @a title ["",{"text":"White","color":"white"},{"text":" team wins!","color":"gold"}]
# Game Over Uninstall
execute if score aqua teamCheck > 0 trigger if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck > 0 trigger if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck > 0 trigger if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck > 0 trigger if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck > 0 trigger if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck > 0 trigger if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck > 0 trigger if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck > 0 trigger if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck > 0 trigger if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck > 0 trigger if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck > 0 trigger if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck > 0 trigger if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck > 0 trigger if score red teamCheck matches 0 if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck > 0 trigger if score white teamCheck matches 0 run function minecraft:uninstall
execute if score aqua teamCheck matches 0 if score black teamCheck matches 0 if score blue teamCheck matches 0 if score dark_aqua teamCheck matches 0 if score dark_blue teamCheck matches 0 if score dark_gray teamCheck matches 0 if score dark_green teamCheck matches 0 if score dark_purple teamCheck matches 0 if score dark_red teamCheck matches 0 if score gold teamCheck matches 0 if score gray teamCheck matches 0 if score green teamCheck matches 0 if score light_purple teamCheck matches 0 if score red teamCheck matches 0 if score white teamCheck > 0 trigger run function minecraft:uninstall