function lobby:difficulty/visual/normal
playsound custom.note_block.pling.no_subtitle ambient @a[distance=..4] ~ ~ ~

difficulty normal
scoreboard players set difficulty state 2


# lightsaber_easteregg
execute unless score pattern lsaber_easteregg matches 1..3 unless score pattern lsaber_easteregg matches 6 unless score pattern lsaber_easteregg matches 9 run scoreboard players set pattern lsaber_easteregg 1

execute if score pattern lsaber_easteregg matches 1..3 run scoreboard players add pattern lsaber_easteregg 1
execute if score pattern lsaber_easteregg matches 6 run scoreboard players add pattern lsaber_easteregg 1
execute if score pattern lsaber_easteregg matches 9 run tellraw @a[distance=..4] ["",{"text":"[!] ","color":"gold","bold":true},{"translate":"msg.lightsaber_easteregg","color":"gray"}]
execute if score pattern lsaber_easteregg matches 9 run scoreboard players add coins shop 11
execute if score pattern lsaber_easteregg matches 9 run function items_py:buy/weapon/all/lightsaber_b
execute if score pattern lsaber_easteregg matches 9 run scoreboard players set pattern lsaber_easteregg 1

execute if score generation state matches 10 run tellraw @a[distance=..4] ["",{"text":"[!] ","color":"gold","bold":true},{"translate":"msg.regenerate_floor","color":"gray"}]
scoreboard players set generation state 0
bossbar set generation visible false
