scoreboard objectives add temp dummy Temp
scoreboard objectives add timer dummy Timer
scoreboard objectives add thirst dummy Thirst
scoreboard objectives add saturation dummy Saturation
scoreboard players add @s saturation 1
scoreboard players add @s thirst 0
scoreboard players add @s temp 0

execute @s[scores={thirst=0..}] ~ ~ ~ detect ~ ~ ~ water 0 scoreboard players remove @s thirst 1

execute @s[scores={thirst=..0}] ~ ~ ~ scoreboard players set @s thirst 0

execute @s ~ 255 ~ execute @s[r=100] ~ ~ ~ scoreboard players remove @s temp 1
execute @s ~ 255 ~ execute @s[r=150] ~ ~ ~ scoreboard players remove @s temp 1
execute @s ~ 255 ~ execute @s[r=180] ~ ~ ~ scoreboard players remove @s temp 1
execute @s ~ 255 ~ execute @s[rm=280] ~ ~ ~ scoreboard players add @s temp 1
execute @s ~ 255 ~ execute @s[rm=300] ~ ~ ~ scoreboard players add @s temp 1
execute @s ~ 255 ~ execute @s[rm=330] ~ ~ ~ scoreboard players add @s temp 1

execute @s[scores={saturation=700..}] ~ ~ ~ scoreboard players add @s thirst 1
execute @s[scores={saturation=700..}] ~ ~ ~ scoreboard players set @s saturation 0
execute @s ~ ~ ~ detect ~ ~ ~ water 0 scoreboard players set @s saturation 0

execute @s[scores={temp=1500..}] ~ ~ ~ scoreboard players add @s saturation 1
execute @s[scores={temp=0..}] ~ ~ ~ scoreboard players remove @s temp 1
execute @s[scores={temp=..0}] ~ ~ ~ scoreboard players add @s temp 1

execute @s ~ ~ ~ detect ~ ~ ~ water 0 scoreboard players remove @s temp 1
execute @s ~ ~ ~ detect ~ ~-1 ~ water 0 scoreboard players remove @s temp 1
execute @s ~ ~ ~ detect ~ ~-1 ~ ice 0 scoreboard players remove @s temp 4
execute @s ~ ~ ~ detect ~ ~-1 ~ stone 0 scoreboard players remove @s temp 1
execute @s ~ ~ ~ detect ~ ~-1 ~ end_stone 0 scoreboard players remove @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ blue_ice 0 scoreboard players remove @s temp 5
execute @s ~ ~ ~ detect ~ ~-1 ~ packed_ice 0 scoreboard players remove @s temp 5
execute @s ~ ~ ~ detect ~ ~-1 ~ snow 0 scoreboard players remove @s temp 3
execute @s ~ ~ ~ detect ~ ~ ~ snow_layer 0 scoreboard players remove @s temp 3
execute @s ~ ~ ~ detect ~ ~-1 ~ grass 0 scoreboard players remove @s temp 1

execute @s ~ ~ ~ detect ~ ~-1 ~ sand 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~ ~ torch 0 scoreboard players add @s temp 1
execute @s ~ ~ ~ detect ~ ~-2 ~ sand 0 scoreboard players add @s temp 1
execute @s ~ ~ ~ detect ~ ~-1 ~ sandstone 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ soul_sand 0 scoreboard players add @s temp 3
execute @s ~ ~ ~ detect ~ ~-1 ~ soul_soil 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ crimson_nylium 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ warped_nylium 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ magma 0 scoreboard players add @s temp 4
execute @s ~ ~ ~ detect ~ ~-1 ~ gravel 0 scoreboard players add @s temp 1
execute @s ~ ~ ~ detect ~ ~-1 ~ obsidian 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ red_sandstone 0 scoreboard players add @s temp 4
execute @s ~ ~ ~ detect ~ ~-1 ~ sand 1 scoreboard players add @s temp 4
execute @s ~ ~ ~ detect ~ ~-1 ~ netherrack 0 scoreboard players add @s temp 3
execute @s ~ ~ ~ detect ~ ~-2 ~ netherrack 0 scoreboard players add @s temp 2
execute @s ~ ~ ~ detect ~ ~-1 ~ quartz_ore 0 scoreboard players add @s temp 3
execute @s ~ ~ ~ detect ~ ~ ~ lava 0 scoreboard players add @s temp 8
execute @s ~ ~ ~ detect ~ ~-1 ~ lava 0 scoreboard players add @s temp 3

execute @s[scores={thirst=0,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §b±
execute @s[scores={thirst=1,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §b±
execute @s[scores={thirst=2,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¶¶  §b±
execute @s[scores={thirst=3,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¶¶¶  §b±
execute @s[scores={thirst=4,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¶¶¶¶  §b±
execute @s[scores={thirst=5,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¶¶¶¶¶  §b±
execute @s[scores={thirst=6,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¼¶¶¶¶¶¶  §b±
execute @s[scores={thirst=7,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¼¶¶¶¶¶¶¶  §b±
execute @s[scores={thirst=8,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¼¶¶¶¶¶¶¶¶  §b±
execute @s[scores={thirst=9,temp=..-3000}] ~ ~ ~ title @s actionbar ¼¶¶¶¶¶¶¶¶¶  §b±
execute @s[scores={thirst=10..,temp=..-3000}] ~ ~ ~ title @s actionbar ¶¶¶¶¶¶¶¶¶¶  §b±

execute @s[scores={thirst=0,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §1±
execute @s[scores={thirst=1,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §1±
execute @s[scores={thirst=2,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¶¶  §1±
execute @s[scores={thirst=3,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¶¶¶  §1±
execute @s[scores={thirst=4,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¶¶¶¶  §1±
execute @s[scores={thirst=5,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¶¶¶¶¶  §1±
execute @s[scores={thirst=6,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¼¶¶¶¶¶¶  §1±
execute @s[scores={thirst=7,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¼¶¶¶¶¶¶¶  §1±
execute @s[scores={thirst=8,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¼¶¶¶¶¶¶¶¶  §1±
execute @s[scores={thirst=9,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¼¶¶¶¶¶¶¶¶¶  §1±
execute @s[scores={thirst=10..,temp=-2999..-1000}] ~ ~ ~ title @s actionbar ¶¶¶¶¶¶¶¶¶¶  §1±

execute @s[scores={thirst=0,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  ±
execute @s[scores={thirst=1,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  ±
execute @s[scores={thirst=2,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¶¶  ±
execute @s[scores={thirst=3,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¶¶¶  ±
execute @s[scores={thirst=4,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¶¶¶¶  ±
execute @s[scores={thirst=5,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¶¶¶¶¶  ±
execute @s[scores={thirst=6,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¼¶¶¶¶¶¶  ±
execute @s[scores={thirst=7,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¼¶¶¶¶¶¶¶  ±
execute @s[scores={thirst=8,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¼¶¶¶¶¶¶¶¶  ±
execute @s[scores={thirst=9,temp=-999..999}] ~ ~ ~ title @s actionbar ¼¶¶¶¶¶¶¶¶¶  ±
execute @s[scores={thirst=10..,temp=-999..999}] ~ ~ ~ title @s actionbar ¶¶¶¶¶¶¶¶¶¶  ±

execute @s[scores={thirst=0,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §6±
execute @s[scores={thirst=1,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §6±
execute @s[scores={thirst=2,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¶¶  §6±
execute @s[scores={thirst=3,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¶¶¶  §6±
execute @s[scores={thirst=4,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¶¶¶¶  §6±
execute @s[scores={thirst=5,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¶¶¶¶¶  §6±
execute @s[scores={thirst=6,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¼¶¶¶¶¶¶  §6±
execute @s[scores={thirst=7,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¼¶¶¶¶¶¶¶  §6±
execute @s[scores={thirst=8,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¼¶¶¶¶¶¶¶¶  §6±
execute @s[scores={thirst=9,temp=1000..2999}] ~ ~ ~ title @s actionbar ¼¶¶¶¶¶¶¶¶¶  §6±
execute @s[scores={thirst=10..,temp=1000..2999}] ~ ~ ~ title @s actionbar ¶¶¶¶¶¶¶¶¶¶  §6±

execute @s[scores={thirst=0,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §4±
execute @s[scores={thirst=1,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¼¶  §4±
execute @s[scores={thirst=2,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¼¶¶  §4±
execute @s[scores={thirst=3,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¼¶¶¶  §4±
execute @s[scores={thirst=4,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¼¶¶¶¶  §4±
execute @s[scores={thirst=5,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¼¶¶¶¶¶  §4±
execute @s[scores={thirst=6,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¼¶¶¶¶¶¶  §4±
execute @s[scores={thirst=7,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¼¶¶¶¶¶¶¶  §4±
execute @s[scores={thirst=8,temp=3000..}] ~ ~ ~ title @s actionbar ¼¼¶¶¶¶¶¶¶¶  §4±
execute @s[scores={thirst=9,temp=3000..}] ~ ~ ~ title @s actionbar ¼¶¶¶¶¶¶¶¶¶  §4±
execute @s[scores={thirst=10..,temp=3000..}] ~ ~ ~ title @s actionbar ¶¶¶¶¶¶¶¶¶¶  §4±

execute @s[scores={temp=3100..,saturation=680..}] ~ ~ ~ effect @s poison 5 0 true
execute @s[scores={temp=3000..}] ~ ~ ~ effect @s nausea 5 0 true
execute @s[scores={temp=..-2000}] ~ ~ ~ effect @s slowness 5 0 true
execute @s[scores={temp=..-2500}] ~ ~ ~ effect @s mining_fatigue 5 0 true
execute @s[scores={thirst=10..}] ~ ~ ~ kill @s
execute @s[scores={thirst=9..}] ~ ~ ~ effect @s nausea 5 0 true
execute @s[scores={thirst=10..}] ~ ~ ~ scoreboard players set @s thirst 0
