Button.MouseClick:Connect(function(b)local r=(game.ReplicatedStorage:WaitForChild("\067\111\100\101\068\111\111\114")):InvokeClient(b)if r==Code.Value then print("\099\111\114\114\101\099\116")Light.Color=Color3.fromRGB(73,181,71)Light.PointLight.Color=Color3.fromRGB(73,181,71)script.Parent.Parent.Lock.Disabled=false script.Parent.Button:Destroy()else print("\105\110\099\111\114\114\101\099\116")end end)

Button.MouseClick:Connect(function(player)
	local newcode = game.ReplicatedStorage:WaitForChild("CodeDoor"):InvokeClient(player)  --we invoke the players client and wait until they return the code

	if newcode == Code.Value then
		print('correct')
		Light.Color = Color3.fromRGB(73, 181, 71)					--Light (part) color changes
		Light.PointLight.Color = Color3.fromRGB(73, 181, 71)		--PointLight color changes (optional, disabled by default)							
		script.Parent.Parent.Lock.Disabled = false
		script.Parent.Button:Destroy()
	else 		--If the code is not correct, we just print "incorrect"
		print('incorrect') 
	end
end)


