scoreboard players set challenge hardmode 1
tellraw @a [{"color":"red","selector":"@p[tag=titans_gambit]"},{"color":"red","text":" has accepted the challenge!"}]
execute unless score hardmode hardmode matches 1 run tellraw @a {"text": "Hardmode will be enabled!","color": "red"}
tellraw @a {"text": "Player stats will be reduced!","color": "red"}
tellraw @a {"text": "Enemy stats will be increased!","color": "red"}
tellraw @a {"text": "The Black Castle Keys will be rewarded!","color": "red"}
tellraw @a {"text": "You have now entered a famine!","color": "red"}
loot give @p[tag=titans_gambit] loot survivalplus:castle_keys
execute as @a at @s run playsound minecraft:entity.wither.spawn master @s ~ ~ ~ 1 0
execute as @a at @s run playsound minecraft:entity.wither.death master @s ~ ~ ~ 1 0
effect give @a minecraft:darkness 5 0 true
schedule function survivalplus:load/hardmode 3s
tag @p[tag=titans_gambit] remove titans_gambit