Your game hangs on this line:
if PlayerGui:WaitForChild("ControlGui"):FindFirstChild("BottomLeftControl") then PlayerGui.ControlGui.BottomLeftControl.Visible = false end
Because ControlGui is not parented to PlayerGui any more if mouse lock is disabled.