I made a "parent scene" that I make inherited scenes from. Its a button with a picture and text with a color rect. I made code were it has a variable made into a string called scenetoload and a variable that lockes and unlocks the level called unlocked. I made it so that if its lock(unlocked = false) then darken it with a color rect. It recieves a signal when the button is pressed and if its unlocked(unlocked = false) then it getstree whaterver that function is (if you can teach me about it then pls) and changes the scene into the sceneto_load variable/string. Here is the code if you need to see:
extends Button
export(String) var scenetoload
export var unlocked = false
func physicsprocess(delta):
if !unlocked:
$ColorRect.color = Color(0,0,0,0.2)
func onButtonpressed():
if unlocked:
gettree().changescene(sceneto_load)