scoreboard players set @a[score_Back_min=20] EffSilence 2
replaceitem entity @a[score_InGame_min=1,score_Back_min=1] slot.hotbar.8 dye 1 8 {display:{Name:"Back to base, don't move!"}}
scoreboard players set @a[score_IsWalking_min=20,score_Back_min=1] Back 0
scoreboard players add @a[score_Back_min=1] Back 1
execute @a[score_Back_min=10] ~ ~ ~ particle portal ~ ~1 ~ 0.1 0.5 0.1 0 1
execute @a[score_Back_min=120] ~ ~ ~ particle largesmoke ~ ~1.5 ~ 0.1 0.1 0.1 0 1
effect @a[score_Back_min=1] nausea 4 0 true
execute @a[score_Back=5,score_Back_min=5] ~ ~ ~ playsound block.portal.travel record @p ~ ~ ~ 2 2 1
scoreboard players set @a[score_Back_min=161] Back 0
scoreboard players set @a[score_HaveObjective_min=1,score_Back_min=1] Back 0
scoreboard players set @a[score_TakeDamage_min=1,score_Back_min=1] Back 0

execute @a[score_Back_min=140,score_Back=141] ~ ~ ~ /playsound entity.endermen.teleport record @a[r=15]

effect @a[score_Back_min=140,score_InGame_min=1] regeneration 2 127 true
effect @a[score_Back_min=140,score_InGame_min=1] resistance 5 100 true
scoreboard players set @a[score_Back_min=140,score_InGame_min=1] Mana 300

effect @a[score_Back=140,score_Back_min=140,score_Class_min=1,score_Class=9,score_InGame_min=1] health_boost 999999 9 true
effect @a[score_Back=140,score_Back_min=140,score_Class_min=11,score_Class=19,score_InGame_min=1] health_boost 999999 4 true
effect @a[score_Back=140,score_Back_min=140,score_Class_min=31,score_Class=39,score_InGame_min=1] health_boost 999999 9 true

scoreboard players set @a[score_Back_min=1] Tmp 140
execute @a[score_Back_min=1] ~ ~ ~ scoreboard players operation @s Tmp -= @s Back
execute @a[score_Back_min=1] ~ ~ ~ scoreboard players operation @s Tmp /= 20 Constant
scoreboard players add @a[score_Back_min=1] Tmp 1
execute @a[score_Back_min=1] ~ ~ ~ title @s actionbar {"text":">>","color":"dark_green","bold":"true","extra":[{"text":" Returning to your Base ","color":"green","bold":"false"},{"score":{"name":"@s","objective":"Tmp"}},{"text":" Don't Move! ","color":"green","bold":"false"},{"text":"<<"}]}

